JRE 6 and 7 side-by-side with JRE 6 as default (Win 7)

15,066

Solution 1

Unfortunately the answer for Applets and web start is that this is not possible (anymore). As can be found in the JRE installer options page of Oracle, the latest JRE is chosen by the browser plugin by default:

Beginning in Java SE 6 update 10 release, the latest JRE software will be registered with all browsers. This ensures that applets will run on the latest and most secure version of the JRE software.

Some solutions can be found that suggest changing several registry keys, but these only work for versions prior to 1.6.0 update 10. As soon you install this or a newer version, those registry keys are ignored.

We are still awaiting a formal response from Oracle, but we do not expect a different outcome.

Solution 2

I wrote a tool to be able to run WebStart on JRE6 and JRE7 side by side. You can download the tool here.

Solution 3

I had a problem that was nearly the same as yours, I wanted to use jre 6 to run an old version of sgd (sun secure global desktop). My walkaround for this :

  • Get firefox portable
  • about:config --> plugin.scan.plid.all = false (don't know if it's necessary)
  • Add jre portable version 6 to the folder (plugins)
  • Go to the Java Control Panel (in Windows Control Panel) --> Java tab --> View.. (Visualiser in french) --> Uncheck 1.7

May be just the last step will work for you...

Hope this will help someone.

Share:
15,066
Jaap Coomans
Author by

Jaap Coomans

Updated on June 14, 2022

Comments

  • Jaap Coomans
    Jaap Coomans almost 2 years

    For a migration project to migrate from Java 6 to Java 7 runtime on Windows 7, we are looking to get the following situation:

    • Both JRE 6 and JRE 7 are installed on the machine
    • JRE 6 is set as the default
    • JRE 7 will be explicitly requested by applets and webstart applications that require it.

    We found lots of solutions that use the path to achieve a situation like this, but we are looking for a way to keep the default path (using the java.exe in C:\Windows\System). Changing the registry key \HKLM\SOFTWARE\Wow6432\JavaSoft\Java Runtime Environment\CurrentVersion to 1.6 does not work unfortunately.

    Does anybody have experience with a setup like this?

    Edit: I get a lot of questions WHY we want this. I can discuss all the ins and outs, but please take it from me that we discussed all possible scenario's and this is the one that impacts our business the least. There are more than 10K systems (laptop + desktop) involved and lots of different Applets, webstart applications and standalone client applications involved.

  • Jaap Coomans
    Jaap Coomans over 10 years
    Why don't you just use the JNLP file to select the correct JRE? WebStart is actually one of the few situations where you can get this to work properly.