I have a problem running JNLP files (mostly for server ILOM consoles). ILOM consoles are different and run on different java versions, so I want to choose which java to use each time.

I have 3 Oracle JDK unpacked and recently I used working script like this:

JAVA=$JAVA_HOME/jre/bin/java $JAVA_HOME/bin/javaws -Xnosplash http://${1}/cgi-bin/jnlpgenerator-16

This was working good and java version was always picked as instructed until something happened. Today running this script I get as a result non-working process:

[kab00m@typer ~]$ ps ax|grep jav

/export/**jdk1.8.0_121**/jre/bin/java -Xbootclasspath/a:/export/**jdk1.6.0_45**/jre/lib/javaws.jar:/export/**jdk1.6.0_45**/jre/lib/deploy.jar:/export/jdk1.6.0_45/jre/lib/plugin.jar -classpath /export/**jdk1.6.0_45**/jre/lib/deploy.jar -Djava.security.policy=file:/export/**jdk1.6.0_45**/jre/lib/security/javaws.policy -DtrustProxy=true -Xverify:remote -Djnlpx.home=/export/**jdk1.6.0_45**/jre/bin -Dsun.awt.warmup=true -Djnlpx.origFilenameArg=http://ranirc/cgi-bin/jnlpgenerator-16 -Djnlpx.remove=false -Djnlpx.jvm=/export/**jdk1.8.0_121**/jre/bin/java com.sun javaws.Main http://ranirc/cgi-bin/jnlpgenerator-16

As seen - this all become mixed up from different JDK versions and not working as intended. My /bin/java is set to openjdk and (I hope) do not interfere here.

What is a mechanism of choosing Java executable behind JAVA and JAVA_HOME environment variables? Or simpler - how javaws can call another java version not knowing if it does exist? Maybe there is some common config location which I do not know about.

  • You set $JAVA to /export/jdk1.6.0_45/jre/jre/bin/java (note jre twice) which doesn't exist and thus can't be used. I don't know what other source javaws is using instead, but I think fixing $JAVA should help. – dave_thompson_085 May 22 at 2:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.