Opening JNLP File in Java 6 JRE instead of JRE 7

2019-01-22 20:58发布

I have Java 6-based Java Web Start application that I need to open on a Windows machine. The machine has JRE 7 installed, with JRE 6 copied manually to the Program Files folder. The problem is that whenever I want to open the JWS application, it opens using Java 7. Even if I use the javaws executable from JRE 6, some properties still refer to JRE 7 files (I verified this by using javaws -verbose app.jnlp. How can I force JRE 6 just for this application?

10条回答
虎瘦雄心在
2楼-- · 2019-01-22 21:33

you have to do in manually by doing following simple process,

  1. right click on jnlp file --> propeties. go to attribute opens with --> click on change button.
  2. select browse.
  3. choose path of javaws.exe of JRE version that you want whether 6 ot 7. ex. C:\Program Files (x86)\Java\jre7\bin\javaws.exe (in my case)
查看更多
闹够了就滚
3楼-- · 2019-01-22 21:35

I have Java 6-based Java Web Start application ..How can I force JRE 6 just for this application?

Use an appropriate version attribute in the j2se element.

<resources>
    <!-- Any 1.6 JRE -->
    <j2se version='1.6*'>
    ...
</resources> 

Warning

This solution no longer seems to work for installing earlier versions of the JVM!

The best reason I can think of for why it would fail to work is that Oracle is tiring of releasing security updates for earlier Java versions - so is forcing every user to use the latest JVM.

查看更多
冷血范
4楼-- · 2019-01-22 21:37

Just explicitly use the javaws.exe from the JRE you want, like this:

C:\Program Files\Java\jdk1.6.0_45\jre\bin\javaws.exe file.jnlp

But please have other answers in mind, like j2se version setting and jnlp spec.

查看更多
ゆ 、 Hurt°
5楼-- · 2019-01-22 21:39

I realize this is the oldest post ever, but it came up when I searched for a similar problem. Easiest way to deal with this (as a one time solution that won't affect the system overall) is to install a parallel older version of Java, and drag the jnlp on to the javaws.exe. (I had a web app that used Java 5 and wouldn't open otherwise)

查看更多
登录 后发表回答