2

I have recently found out the hard way that Oracle has decided to silently nuke JRE 6 when a JRE7 update is installed.

Is it possible to leave JRE7 on auto-update without breaking JRE6? If not, how else can we ensure JRE6 stays? Is there a better way than manually reinstalling it after every single JRE7 update?

(the legacy apps will hopefully be updated to JRE7 sooner or later, but we didn't write them, so we can't update them)

2
  • Have you identified why they don't work with Java 7? I.e.: has the vendor given you any clues? Commented Feb 21, 2013 at 21:14
  • @SimonCatlin in at least one case the vendor "didn't get round to it yet". Yeah, I know... But to be honest, Oracle's wiping JRE6 is at least as bad.
    – RomanSt
    Commented Feb 22, 2013 at 11:10

1 Answer 1

4
+50

Does your JRE6 need to be "installed" through Programs and Features? If not, you can simply copy the JRE files to a predefined location on your disk (your apps will have to point to this), then JRE 7 would be unaware of the presence of JRE 6 and would not delete it.

Otherwise, another option would be to make your JRE 6 folder "read only" so that the JRE7 installer can't nuke it.

Also, it is only recently that the JRE7 installer nuked the JRE6 install (I think starting with 7 update 13). This is because of the recent Java "zero day exploits" that have compromised previous versions of Java. However, if you have an older version of JRE6 installed, the JRE7 installer may not nuke those older JRE6 installs.

4
  • That might work, if there is a configuration value for the JRE path in each legacy app. I'll try this.
    – RomanSt
    Commented Mar 4, 2013 at 10:00
  • That's precisely what you'd need to do: System wide, JRE7 is installed, but you can have as many other versions installed separately by just copying the files to a location of your choosing and making sure that for each application to be run with a different JRE the environment (PATH, CLASSPATH, JAVA_HOME, any others) refer ONLY to the correct JRE for the application.
    – SuperMagic
    Commented Mar 7, 2013 at 4:33
  • This did not work. I don't know how to make the legacy applications use JRE6. TeamCity - the least legacy app of all we have here - has agents that log "Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion' has value '1.7', but '1.6' is required." and refuse to run. Another app, which is shipped as an exe, simply doesn't run at all, no error messages or anything.
    – RomanSt
    Commented Mar 9, 2013 at 17:08
  • One last resort (this might cause JRE 7 updates to fail): Change this key back to 1.6, then make the key read-only so that the JRE 7 installer can't update it. I've never tried anything like this, so it's possible the JRE7 installer will puke when trying to install an update. If it doesn't work, then you'll have to have your legacy app updated. It's unfortunate that it requires validation from that registry key; but seeing as it does, your hands will be tied whenever a JRE 7 update occurs. I'm quite sure that there is no other way to prevent this key from being updated on JRE 7 installs.
    – Jon
    Commented Mar 9, 2013 at 17:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .