The Java Web Start application works with Java 6, but only if Java 7 is completely uninstalled. (Win7)

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 File IRP EMS --> <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" 
+4
source share
1 answer

After digging, I uninstalled Java 7, got the working configuration, copied the -verbose output using javaws.exe, and then integrated it into my script. Finally, I reinstalled all versions of java and now it works. Here is my script.

 set JAVA_HOME="C:\Program Files (x86)\Java\jre6" set CLASSPATH=%JAVA_HOME%\lib\deploy.jar set BOOTCP=%JAVA_HOME%\lib\javaws.jar;%JAVA_HOME%\lib\deploy.jar;%JAVA_HOME%\lib\plugin.jar set SECPOL=file:%JAVA_HOME%\lib\security\javaws.policy set SPLASHPORT="-Djnlpx.splashport=49688" %JAVA_HOME%\bin\javaw.exe -Xbootclasspath/a:%BOOTCP% -classpath %CLASSPATH% -Djava.security.policy=%SECPOL% -DtrustProxy=true -Xverify:remote -Djnlpx.home=%JAVA_HOME%\bin -Dsun.aws.warmpu=true -Djnlpx.origFilenameArg=C:\opt\kvm\ui.jnlp -Djnlpx.remove=false -Xnoclassgc -XX:PermSize=64m -Xms1028m -Djnlpx.heapsize=1028m,NULL %SPLASHPORT% com.sun.javaws.Main C:\opt\kvm\ui.jnlp 

It is very ugly, however it is literally what he asked for. I did not understand that all java tools are the same JVM call with changes in the main one. Now that makes sense, but, as a C ++ guy, this stuff is a bit magical.

He still doesn't answer how to configure this on his own using only javaws, but he solves the problem using its output.

Thanks again for your help.

+2
source

Source: https://habr.com/ru/post/1468758/


All Articles