Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opening JNLP File in Java 6 JRE instead of JRE 7

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?

like image 257
Ariod Avatar asked Dec 06 '12 13:12

Ariod


People also ask

How do I open a JNLP file with JRE?

Right-click a JNLP file and click “Open With.” Select the “Java Web Start Launcher” application in the list or click “Browse,” browse to the “C:\Program Files (x86)\Java\jre[version]\bin” folder on your computer and double-click the “Javaws.exe” program file.

How do I change the default JNLP app?

Click on 'Programs'. In the next window, under 'Default Programs', click on 'Make a file type always open in a specific program'. Scroll down to find the 'JNLP' extension from the list and click on the 'Change program' button. Click on 'More apps', scroll down to select 'Look for another app on this PC'.

Why is JNLP not launching?

Sometimes, your system might not recognize JNLP files properly for executing them with the Java Web Start application. In such cases, you will have to modify the file association of your computer to correctly open the JNLP files with the Java Web Start application.


2 Answers

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.

like image 183
Andrew Thompson Avatar answered Nov 06 '22 23:11

Andrew Thompson


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)

like image 40
Ben Avatar answered Nov 07 '22 00:11

Ben