How can I set one browser to use JRE 1.5 and another to use JRE 1.6?
I think this has to be a common issue, but I haven't found any clear solution.
We have several products that are accessed via a browser (IE 7) with JRE version 1.5.
We now need to be able to support another application using JRE 1.6.
I thought that one solution would be to install Firefox on the client and set 1.6 to only work with Mozilla-type browsers, but I've found that this doesn't actually work. I still got 1.6 in IE, which caused issues with the older applications.
Is there a way to separate which JRE is used by browser? Batch scripts or registry hacks would probably be fine.
Update - April 6th, 2011:
We have one application that insists on using IBM JRE 1.5 v9. If we try to run it with any other JRE version then it will simply prompt a download of the JRE from the server. Maybe it would work with JRE 1.6, however, it doesn't recognise any other version than the one it wants to use. The product we are using is ITM (IBM Tivoli Monitoring). I have also seen similar behaviour with other COTS products in the past e.g. Ciscoworks, which used to only work with JRE 1.4.2_06. Any other version and it prompts for a plugin install...
So my question is not about compatibility of one Java version with another. My question is about how to support applications that have to work with different version of JRE, from the same client
Oh, and I can't use anything that requires a user to enable/disable plugins as required, because this has to run on a restricted client system (on which the user will have very limited user level privileges). The current setup has application icons (Internet Explorer with a URL argument) that they select from the desktop.
Java should be backwards compatible, so the program compiled in 1.5 should run fine in 1.6. In fact there is not much that is different syntax wise between the two and 1.5 is getting to be really old. I would suggest testing your 1.5 products on 1.6 and seeing if they operate correctly.
In Mozilla Firefox at the add-ons page you can disable/enable plugins. Install the necessary JREs. Then create separate Firefox profiles. And in each profile enable/disable the specific JREs as required.
You can have multiple versions of Java installed, but I don't know how you force the browser to use one or the other for specific applications. Perhaps it'll do it automatically somehow depending on how the application is launched?
Edit: another Stack Overflow link covering it to some extent is Multiple Java versions running concurrently under Windows.