[问题]关于jdk的问题(老问题已经解决,新问题又出现了java1.4的字体问题)~~~!

为当前最终发行版之前的所有版本提供支持
头像
why_790721
帖子: 295
注册时间: 2006-12-01 22:28
送出感谢: 0
接收感谢: 0

[问题]关于jdk的问题(老问题已经解决,新问题又出现了java1.4的字体问题)~~~!

#1

帖子 why_790721 » 2007-06-18 22:27

我原来在6.06上安装java WTK时可以自动找到jdk的路径,但是在7.04中安装java WTK却找不到路径(jdk我已经安装了),需要自己手动输入路径,可是我试过所有的java路径,都提示我说不是有效的java解释器,到底jdk安装在那个目录,望高手指点我!
java WTK只认java1.4,所以我下载并安装上了,可是出来的全是方块,不是中文啊!
上次由 why_790721 在 2007-06-22 16:57,总共编辑 2 次。
头像
xport
帖子: 1277
注册时间: 2006-05-19 21:23
送出感谢: 0
接收感谢: 0
联系:

#2

帖子 xport » 2007-06-19 0:21

回答你的问题,如果是从软件源来安装JDK环境,默认有2个,会在 Debian alternative 机制下设定:

查看java命令是哪个?

代码: 全选

$ which java
/usr/bin/java
发现是指向 alternatives 命令的一个符号链接:

代码: 全选

$ ls -l `which java`
lrwxrwxrwx 1 root root 22 2007-01-17 01:59 /usr/bin/java -> /etc/alternatives/java
而所有的 alternatives 命令也只是一个符号链接,指向目前所启用的候选命令:

代码: 全选

$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 40 2007-04-04 09:46 /etc/alternatives/java -> /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
查看 java 的 alternatives 所对应的所有候选命令,priority 高的在 auto 模式下会优先使用,我这里是 manual 状态。

代码: 全选

$ update-alternatives --display java
java - status is manual.
 link currently points to /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
/usr/lib/jvm/java-1.5.0-sun/jre/bin/java - priority 53
 slave java.1.gz: /usr/lib/jvm/java-1.5.0-sun/jre/man/man1/java.1.gz
/usr/bin/gij-wrapper-4.1 - priority 41
 slave java.1.gz: /usr/share/man/man1/gij-wrapper-4.1.1.gz
Current `best' version is /usr/lib/jvm/java-1.5.0-sun/jre/bin/java.
可以看到,我目前的 java 命令所在的目录实际上是:/usr/lib/jvm/java-1.5.0-sun/jre/bin/java
其实我是一个演员!-http://blog.csdn.net/xport/
头像
why_790721
帖子: 295
注册时间: 2006-12-01 22:28
送出感谢: 0
接收感谢: 0

#3

帖子 why_790721 » 2007-06-19 11:27

楼上的大侠,你的回答太深奥了我看不明白啊!干脆我贴个图你看看(我安装的是j2me_wireless_toolkit-2_2-ml-linux-i386.bin):
附件
Screenshot.png
头像
oneleaf
论坛管理员
帖子: 10237
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04
送出感谢: 7 次
接收感谢: 107 次

#4

帖子 oneleaf » 2007-06-19 11:46

/usr/lib/jvm/java-1.5.0-sun/
头像
czybear
帖子: 54
注册时间: 2007-06-12 17:22
送出感谢: 0
接收感谢: 0

#5

帖子 czybear » 2007-06-19 12:02

它文你要的是j2se sdk(Java 2 SDK, Standard Edition)的路径阿,你装的是j2me 当然不行了。
头像
why_790721
帖子: 295
注册时间: 2006-12-01 22:28
送出感谢: 0
接收感谢: 0

#6

帖子 why_790721 » 2007-06-19 13:24

czybear 写了:它文你要的是j2se sdk(Java 2 SDK, Standard Edition)的路径阿,你装的是j2me 当然不行了。
难道sudo apt-get install sun-java6-jdk这个命令安装的是j2me?
我不玩linux,是linux玩我!
头像
xport
帖子: 1277
注册时间: 2006-05-19 21:23
送出感谢: 0
接收感谢: 0
联系:

#7

帖子 xport » 2007-06-19 13:31

你的安装程序等你喂JDK的path进去,你却输入了个java文件的路径,当然啊不行了,仔细看安装时候的提示呀~~~
Enter the path to the Java 2 SDK
输入这个看看:/usr/lib/jvm/java-6-sun/,如果还是有问题,就试试: /usr/lib/jvm/java-6-sun/jre/
其实我是一个演员!-http://blog.csdn.net/xport/
头像
why_790721
帖子: 295
注册时间: 2006-12-01 22:28
送出感谢: 0
接收感谢: 0

#8

帖子 why_790721 » 2007-06-19 14:00

早就已经是过了,不行。
还是提示:
/usr/lib/jvm/java-6-sun/ is not a suitable Java interpreter

/usr/lib/jvm/java-6-sun/jre/ is not a suitable Java interpreter
头像
xport
帖子: 1277
注册时间: 2006-05-19 21:23
送出感谢: 0
接收感谢: 0
联系:

#9

帖子 xport » 2007-06-19 14:07

为什么不仔细看“系统要求”的说明呢? http://gceclub.sun.com.cn/products/sjwt ... d-2_2.html
系统要求-软件 写了: * Microsoft Windows XP 或(不支持的)Linux-x86
* 如果您打算从事实际开发,请使用 JavaTM 2 SDK Standard Edition (J2SE SDK) 版本 1.4.2;如果您只打算运行演示应用程序,请使用 JavaTM 2 Standard Edition Runtime Environment (JRE) 版本 1.4.2。

要下载所需的 SDK 或 JRE,请转至 http://java.sun.com/j2se/downloads.html
其实我是一个演员!-http://blog.csdn.net/xport/
头像
neomi
帖子: 137
注册时间: 2006-08-11 13:03
送出感谢: 0
接收感谢: 0

#10

帖子 neomi » 2007-06-19 14:57

最少也该是

代码: 全选

/usr/lib/jvm/java-6-sun/jdk/bin
吧,说的是 interpreter path

路径以你实际安装的为准,jdk 里的 java bin 文件在哪就写哪

放心,我最近正好在 linux 下做 j2me 的工程,都是实际试过的
头像
xport
帖子: 1277
注册时间: 2006-05-19 21:23
送出感谢: 0
接收感谢: 0
联系:

#11

帖子 xport » 2007-06-19 15:13

楼上是正确的。
其实我是一个演员!-http://blog.csdn.net/xport/
头像
why_790721
帖子: 295
注册时间: 2006-12-01 22:28
送出感谢: 0
接收感谢: 0

#12

帖子 why_790721 » 2007-06-19 16:59

这是我的jdk的安装路径:
./
usr/
usr/share/
usr/share/doc/
usr/share/doc/sun-java6-jdk/
usr/share/doc/sun-java6-jdk/README.html
usr/share/doc/sun-java6-jdk/README.alternatives
usr/share/doc/sun-java6-jdk/copyright
usr/share/doc/sun-java6-jdk/changelog.Debian.gz
usr/share/java-6-sun-1.6.0.00/
usr/share/applications/
usr/share/applications/sun-java6-jconsole.desktop
usr/share/lintian/
usr/share/lintian/overrides/
usr/share/lintian/overrides/sun-java6-jdk
usr/share/doc-base/
usr/share/doc-base/sun-java6-jdk-readme
usr/share/menu/
usr/share/menu/sun-java6-jdk
usr/lib/
usr/lib/jvm/
usr/lib/jvm/java-6-sun-1.6.0.00/
usr/lib/jvm/java-6-sun-1.6.0.00/jre/
usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/
usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/i386/
usr/lib/jvm/java-6-sun-1.6.0.00/man/
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/apt.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/extcheck.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/idlj.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/jar.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/javac.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/javadoc.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/javah.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/javap.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/jconsole.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/jdb.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/jhat.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/jmap.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/jps.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/jrunscript.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/jsadebugd.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/jstack.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/jstatd.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/native2ascii.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/rmic.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/serialver.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/wsgen.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/wsimport.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/xjc.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/appletviewer.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/jarsigner.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/jinfo.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/jstat.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/man1/schemagen.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/apt.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/extcheck.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/idlj.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/jar.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/javac.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/javadoc.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/javah.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/javap.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/jconsole.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/jdb.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/jhat.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/jmap.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/jps.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/jrunscript.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/jsadebugd.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/jstack.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/jstatd.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/native2ascii.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/rmic.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/serialver.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/wsgen.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/wsimport.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/xjc.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/appletviewer.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/jarsigner.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/jinfo.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/jstat.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/man/ja/man1/schemagen.1.gz
usr/lib/jvm/java-6-sun-1.6.0.00/bin/
usr/lib/jvm/java-6-sun-1.6.0.00/bin/javac
usr/lib/jvm/java-6-sun-1.6.0.00/bin/javadoc
usr/lib/jvm/java-6-sun-1.6.0.00/bin/apt
usr/lib/jvm/java-6-sun-1.6.0.00/bin/javah
usr/lib/jvm/java-6-sun-1.6.0.00/bin/idlj
usr/lib/jvm/java-6-sun-1.6.0.00/bin/jarsigner
usr/lib/jvm/java-6-sun-1.6.0.00/bin/java-rmi.cgi
usr/lib/jvm/java-6-sun-1.6.0.00/bin/jar
usr/lib/jvm/java-6-sun-1.6.0.00/bin/xjc
usr/lib/jvm/java-6-sun-1.6.0.00/bin/schemagen
usr/lib/jvm/java-6-sun-1.6.0.00/bin/wsgen
usr/lib/jvm/java-6-sun-1.6.0.00/bin/wsimport
usr/lib/jvm/java-6-sun-1.6.0.00/bin/appletviewer
usr/lib/jvm/java-6-sun-1.6.0.00/bin/rmic
usr/lib/jvm/java-6-sun-1.6.0.00/bin/javap
usr/lib/jvm/java-6-sun-1.6.0.00/bin/native2ascii
usr/lib/jvm/java-6-sun-1.6.0.00/bin/serialver
usr/lib/jvm/java-6-sun-1.6.0.00/bin/jps
usr/lib/jvm/java-6-sun-1.6.0.00/bin/jstat
usr/lib/jvm/java-6-sun-1.6.0.00/bin/jstatd
usr/lib/jvm/java-6-sun-1.6.0.00/bin/jsadebugd
usr/lib/jvm/java-6-sun-1.6.0.00/bin/jstack
usr/lib/jvm/java-6-sun-1.6.0.00/bin/jmap
usr/lib/jvm/java-6-sun-1.6.0.00/bin/jinfo
usr/lib/jvm/java-6-sun-1.6.0.00/bin/jconsole
usr/lib/jvm/java-6-sun-1.6.0.00/bin/jrunscript
usr/lib/jvm/java-6-sun-1.6.0.00/bin/jhat
usr/lib/jvm/java-6-sun-1.6.0.00/bin/extcheck
usr/lib/jvm/java-6-sun-1.6.0.00/bin/jdb
usr/lib/jvm/java-6-sun-1.6.0.00/bin/HtmlConverter
usr/lib/jvm/java-6-sun-1.6.0.00/include/
usr/lib/jvm/java-6-sun-1.6.0.00/include/jni.h
usr/lib/jvm/java-6-sun-1.6.0.00/include/linux/
usr/lib/jvm/java-6-sun-1.6.0.00/include/linux/jni_md.h
usr/lib/jvm/java-6-sun-1.6.0.00/include/linux/jawt_md.h
usr/lib/jvm/java-6-sun-1.6.0.00/include/jvmti.h
usr/lib/jvm/java-6-sun-1.6.0.00/include/classfile_constants.h
usr/lib/jvm/java-6-sun-1.6.0.00/include/jawt.h
usr/lib/jvm/java-6-sun-1.6.0.00/include/jdwpTransport.h
usr/lib/jvm/java-6-sun-1.6.0.00/lib/
usr/lib/jvm/java-6-sun-1.6.0.00/lib/jconsole.jar
usr/lib/jvm/java-6-sun-1.6.0.00/lib/sa-jdi.jar
usr/lib/jvm/java-6-sun-1.6.0.00/lib/ct.sym
usr/lib/jvm/java-6-sun-1.6.0.00/lib/orb.idl
usr/lib/jvm/java-6-sun-1.6.0.00/lib/ir.idl
usr/lib/jvm/java-6-sun-1.6.0.00/lib/jexec
usr/lib/jvm/java-6-sun-1.6.0.00/lib/dt.jar
usr/lib/jvm/java-6-sun-1.6.0.00/lib/htmlconverter.jar
usr/lib/jvm/java-6-sun-1.6.0.00/lib/tools.jar
usr/lib/jvm/java-6-sun-1.6.0.00/README.html
usr/lib/jvm/java-6-sun-1.6.0.00/COPYRIGHT
usr/lib/jvm/java-6-sun-1.6.0.00/LICENSE
usr/lib/jvm/java-6-sun-1.6.0.00/THIRDPARTYLICENSEREADME.txt

我仔细找了里面没有我想要得文件。
头像
neomi
帖子: 137
注册时间: 2006-08-11 13:03
送出感谢: 0
接收感谢: 0

#13

帖子 neomi » 2007-06-19 17:10

不好意思,我记错 ubuntu 下 jdk 的目录结构了

按你贴出来的应该是

代码: 全选

/usr/lib/jvm/java-6-sun-1.6.0.00/bin/
头像
why_790721
帖子: 295
注册时间: 2006-12-01 22:28
送出感谢: 0
接收感谢: 0

#14

帖子 why_790721 » 2007-06-19 17:21

neomi 写了:不好意思,我记错 ubuntu 下 jdk 的目录结构了

按你贴出来的应该是

代码: 全选

/usr/lib/jvm/java-6-sun-1.6.0.00/bin/
我早已经试过了,不行的!
我不玩linux,是linux玩我!
头像
why_790721
帖子: 295
注册时间: 2006-12-01 22:28
送出感谢: 0
接收感谢: 0

#15

帖子 why_790721 » 2007-06-19 17:58

谢谢各位的赐教,问题已经解决了:我下载了一个1.4的版本,然后安装,最后安装j2me_wireless_toolkit-2_2-ml-linux-i386.bin时输入路径,ok了!
不过新的问题有出现了,安装完之后,我的j2me_wireless_toolkit的字体都是方块了!
怎么办?
回复

回到 “老旧版本支持”