We use a network KVM switch that opens the Java Web Start boot panel to load the console. When I run it using Java 6, update 43, everything works fine. Then I install Java 7 update 17 next to it and it gets a socket connection error. I allowed writing a simple script package that forcefully selects a Java home, as well as a web launch application. Then I saved the downloaded jnlp file so that I could name it on a whim. I'm by no means a Java developer, so I apologize for any offensive actions.
set JAVA_HOME="C:\Program Files (x86)\Java\jre6" %JAVA_HOME%\bin\javaws.exe "C:\opt\kvm\ui.jnlp"
Here is the error message I get.
java.io.IOException: JNLP Jar download failure. at com.sun.javaws.LaunchDownload.validateResults(Unknown Source) at com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source) at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source) at com.sun.javaws.Launcher.downloadResources(Unknown Source) at com.sun.javaws.Launcher.prepareResources(Unknown Source) at com.sun.javaws.Launcher.prepareAllResources(Unknown Source) at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source) at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source) at com.sun.javaws.Launcher.launch(Unknown Source) at com.sun.javaws.Main.launchApp(Unknown Source) at com.sun.javaws.Main.continueInSecureThread(Unknown Source) at com.sun.javaws.Main$1.run(Unknown Source) at java.lang.Thread.run(Unknown Source)'
I was wondering if you were aware of any reasons why Java would have a different behavior when installing multiple versions of Java? The best explanation I can come up with is a library collision. If so, I need to find a way to manually set the library path in such a way that it only calls Jre6 dlls / tools. If anyone has any advice, I would be extremely grateful. I also added internal jnlp data. Thank you very much for your time.
<?xml version="1.0" encoding="utf-8"?> <jnlp spec="6.0+" codebase="https://<IP-Address>"> <information> <title>TrippLite UI</title> <vendor>TrippLite</vendor> <homepage href="http://www.tripplite.com"/> <description kind="short">TrippLite Manager</description> <icon href="minicom_desktop.gif"/> </information> <security> <all-permissions/> </security> <resources> <j2se version="1.6+" initial-heap-size="256m" java-vm-args="-Xnoclassgc - XX:PermSize=64m" href="http://java.sun.com/products/autodl/j2se"/> <jar href="./boot.jar"/> <jar href="./app.jar"/> <jar href="./vendor.jar"/> <jar href="./miglayout15-swing.jar"/> <jar href="./jnlp.jar"/> <jar href="./xstream-1.3.1.jar"/> <jar href="./xpp3_min-1.1.4c.jar"/> <nativelib href="./plugin.jar"/> <property name="devport" value="900"/> </resources> <application-desc main-class="com.minicom.app.video.ui.ShowLogin"> </application-desc> </jnlp>
Update
I ran the script with -verbose and got the following output. I am new to SO, so I cannot post images. Link here.
https://raw.github.com/marvins/temp_images/master/with_setting.png
Now it seems that the problem is that vm calls jre7 the javaw.exe file. Do you know how I can override "-Djnlpx.jvm = C: \ Program Files (x86) \ Java \ jre7 \ bin \ javaws.exe and replace it with jre6? I'm trying to use different forms" -J- Djnlpx.jvm = "and it gives a view similar to the one below. It shows it there, but does not replace the value.
Is there a more suitable way to force the correct javaws?
%JAVA_HOME%\bin\javaws.exe "-J-Djnlpx.jvm=C:\Program Files (x86)\Java\jre6\bin\javaw.exe" -verbose "C:\opt\kvm\ui.jnlp"