Different behaviour of javaws with and without verbose option
Asked Answered
M

0

6

I experience quite a mysterious issue with javaws utility and don't know how should I proceed with investigation of the root cause.

Here is the information I managed to gather:

$ 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

(I stripped part of the paths here, because of confidential reasons)

I have 2 versions available currently, but only 1.7 should be active. I'm supposed to do an upgrade of Java versions, but almost at the end that bug appear.

First of all the command that should be working as expected is the following:

$ javaws http://link_to_file.jnlp

Here are the commands that I have executed with some extra explanation below:

$ 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

This actually does not disable Java and multiple executions of the command give the same result.

$ 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."

Using verbose gives me the expected behavior. How weird is that?!

...it becomes even more interesting...

$ 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.

This command successfully disabled Java and I have to manually enable it using jcontrol (Control Panel)

$ /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."

Again using verbose gives me the expected behavior.

Summary:

  1. javaws and /usr/lib/jvm/jre-1.7.0.51-linux/bin/javaws have different behaviors, although javaws is a symbolic link to /usr/lib/jvm/jre-1.7.0.51-linux/bin/javaws .

  2. Using -verbose option gives us different (expected) behavior.

Does anybody have an idea why verbose is behaving differently and is there a way to make its behavior the default one?

Big thanks to everyone and sorry for the long post. I just wanted to be specific enough. :)

Best regards, Teodor

Multiplier answered 24/8, 2016 at 10:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.