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

Jaap Coomans picture Jaap Coomans · Jun 3, 2013 · Viewed 15.1k times · Source

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.

Answer

Jaap Coomans picture Jaap Coomans · Jun 11, 2013

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.