How can I set one browser to use JRE 1.5 and another to use JRE 1.6?

26,605

Solution 1

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.

Solution 2

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.

Solution 3

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.

Share:
26,605

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    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.

    • Admin
      Admin about 13 years
      How much control do you have over these products? Could a situation like the one jzd mentioned in a comment be applicable to you?
  • bhaskar
    bhaskar about 13 years
    You're right, it should be, but I've run into cases where it's not.
  • bhaskar
    bhaskar about 13 years
    Also, the OP already tried testing the 1.5 products in 1.6 and they failed: "I still got 1.6 in IE, which caused issues with the older applications."
  • mark c
    mark c about 13 years
    @LordTorg, agreed, but testing the application allows you to determine if this is the case or not. I was told that an application would only work on Java 1.4. Which I found only to be true for 1 small admin feature. This allowed all the non-admins to be bumped up to 1.6 which was required by another app.
  • bhaskar
    bhaskar about 13 years
    Hm, good point, I didn't think the OP had access to the products themselves. I'll ask in a comment.
  • Jared Harley
    Jared Harley about 13 years
    I've run into an issue with some software we use at work that requires Java 1.6u22. Upgrading to 1.6u24 causes the application to completely not work (not just some features, the program wouldn't even launch), so now a bunch of PCs in my office are running a 6-month old version of Java until the vendor gets around to updating the software.
  • mark c
    mark c about 13 years
    @Jared, yes there are some ways you can write a Java app that is depended on a specific version (or bugs in a specific version). But it is worth fully testing because many times this is not the case.
  • GAThrawn
    GAThrawn almost 13 years
    LOL at the great Java compatibility "write-once run-anywhere" myth. If you believe that, then you really haven't used much commercial software that uses Java. I've got 3 versions of Java on my PC, and another 2 on a VM to support all the software (and hardware embedded software) that I need to use that will only only use one very specific Java version. It's always been this way with Java, and I can't see any likelihood it will ever change.