Webstart runs with wrong version of JRE

旧时模样 提交于 2019-11-27 03:18:39

问题


I have a Java webstart application that requires Java 7+, so the JNLP has this line:

<j2se version="1.7+" href="http://java.sun.com/products/autodl/j2se"/>

This works on various Windows XP & Windows 7 machines (most of them also having Java 6 installed) but on one of them, webstart is launched with Java 6 and fails (wrong version of JRE). I found this post and checked the Java settings and they look fine:

I have also tried changing the JNLP line to this but it still does not work:

<j2se version="1.7+"/>

Any ideas on how to let webstart know that the JRE 1.7 is there?

Config: Windows 7, run as administrator - webstart application launched from IE.


回答1:


I found the problem. I had Java 6 32bits & 64bits installed, but Java 7 only had the 64bits version installed. And I was launching the webstart link from Internet Explorer 32 bits, which I suppose cannot use a 64 bits version of JRE.

Launching the webstart from IE 64 bits worked fine.

Thanks for your comments, I figured the problem out while doing one of the manipulations you recommended.




回答2:


I had a similar problem with Java 6 being used to launch JNLPs rather than Java 7 (I have both installed), even though my JAVA_HOME, PATH and Java Control Panel settings were all set to 7. Java 7 would be used when launching from a web page, but from a desktop shortcut, Java 6 was being used and so be unable to launch the app since it requires 7.

Turns out that there are java, javaw and javaws executables present in C:\Windows\SysWOW64 and this is what the generated shortcut points to. So I overwrote those EXEs with the ones from C:\Program Files\Java\jre7\bin.

Perhaps a reinstallation of JRE 7 would also have fixed this but I just went for this quick fix.



来源:https://stackoverflow.com/questions/9802577/webstart-runs-with-wrong-version-of-jre

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!