我遇到了javaws实用程序的一个相当神秘的问题,不知道我应该如何继续调查根本原因。
以下是我设法收集的信息:
$ cat /etc/os-release
ID=wrlinux
NAME=Wind River Linux
VERSION=6.0.0.17
VERSION_ID=6.0.0.17
PRETTY_NAME=Wind River Linux 6.0.0.17
$ rpm -qa | grep jdk
jdk-fonts-1.5.0-u19r0.0.lib32_x86
jdk-plugin-1.5.0-u19r0.0.lib32_x86
jdk-1.5.0-u19r0.0.lib32_x86
jdk-dev-1.5.0-u19r0.0.lib32_x86
jdk7-1.7.0-u51r2.0.lib32_x86
jdk7-plugin-1.7.0-u51r2.0.lib32_x86
jdk7-fonts-1.7.0-u51r2.0.lib32_x86
jdk7-dev-1.7.0-u51r2.0.lib32_x86
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:$HOME:/usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/bin
(由于保密原因,我在这里删除了部分路径)
我目前有2个版本可用,但只有1.7个应该是活动的。 我应该对Java版本进行升级,但几乎最终会出现错误。
首先,应按预期工作的命令如下:
$ javaws http://link_to_file.jnlp
以下是我执行的命令以及下面的一些额外说明:
$ javaws http://link_to_file.jnlp
Disabling Java as it is too old and likely to be out of date. To reenable use jcontrol utility
这实际上并没有禁用Java和多次执行 命令给出相同的结果。
$ javaws -verbose http://link_to_file.jnlp
Java(TM) Web Start 10.51.2.13-fcs Launching: /usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/bin/java
/usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/bin/java
-classpath
/usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/lib/deploy.jar
-Djava.security.policy=file:/usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/lib/security/javaws.policy
-DtrustProxy=true
-Xverify:remote
-Djnlpx.home=/usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/bin
-Djnlpx.origFilenameArg=http://link_to_file.jnlp
-Djnlpx.remove=false
-Dsun.awt.warmup=true
-Xbootclasspath/a:/usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/lib/javaws.jar:/usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/lib/deploy.jar:/usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/lib/plugin.jar
-Djnlpx.splashport=40783
-Djnlpx.jvm=/usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/bin/java
com.sun.javaws.Main
-verbose
-notWebJava
http://link_to_file.jnlp
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="Sun Microsystems Inc."
使用verbose给出了预期的行为。这有多奇怪?!
......它变得更有趣......
$ which javaws
/usr/bin/javaws
$ file /usr/bin/javaws
/usr/bin/javaws: symbolic link to `/usr/lib/jvm/jre-1.7.0.51-linux/bin/javaws'
$ /usr/lib/jvm/jre-1.7.0.51-linux/bin/javaws http://link_to_file.jnlp
Disabling Java as it is too old and likely to be out of date. To reenable use jcontrol utility
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="Sun Microsystems Inc."
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="Sun Microsystems Inc."
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="Sun Microsystems Inc."
$ /usr/lib/jvm/jre-1.7.0.51-linux/bin/javaws http://link_to_file.jnlp
This application cannot be downloaded because Java has been disabled through the web. You can enable Java on this system using the Java Control Panel.
此命令已成功禁用Java,我必须使用jcontrol(控制面板)
手动启用它
$ /usr/lib/jvm/jre-1.7.0.51-linux/bin/javaws -verbose http://link_to_file.jnlp
Java(TM) Web Start 10.51.2.13-fcs Launching: /usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/bin/java
/usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/bin/java
-classpath
/usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/lib/deploy.jar
-Djava.security.policy=file:/usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/lib/security/javaws.policy
-DtrustProxy=true
-Xverify:remote
-Djnlpx.home=/usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/bin
-Djnlpx.origFilenameArg=http://link_to_file.jnlp
-Djnlpx.remove=false
-Dsun.awt.warmup=true
-Xbootclasspath/a:/usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/lib/javaws.jar:/usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/lib/deploy.jar:/usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/lib/plugin.jar
-Djnlpx.splashport=43537
-Djnlpx.jvm=/usr/lib/jvm/java-1.7.0-linux-1.7.0.51/jre/bin/java
com.sun.javaws.Main
-verbose
-notWebJava
http://link_to_file.jnlp
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="Sun Microsystems Inc."
再次使用verbose给我预期的行为。
要点:
javaws 和 /usr/lib/jvm/jre-1.7.0.51-linux/bin/javaws 有不同的行为,尽管javaws是一个符号链接to /usr/lib/jvm/jre-1.7.0.51-linux/bin/javaws。
- 醇>
使用 -verbose 选项可为我们提供不同的(预期)行为。
有没有人知道为什么详细信息表现不同,是否有办法使其行为成为默认行为?
非常感谢大家,感谢抱歉。 我只是想要足够具体。 :)
祝你好运, 特奥多尔