Multiple JREs with IE7?
February 3, 2009 10:40 AM   Subscribe

My company forces the use of Internet Explorer for a number of internal sites. Now, they're also enforcing the use of an old version of Java (1.4.2_06) instead of just warning you. The trouble is I have Java 6 installed and despite also having 1.4.2_06 installed, IE 7 refuses to use it.

I have a number of very useful Java apps that require Java 6 so right now I have to uninstall Java 6 to access the sites and then re-install when I'm done. This is painful but not fatal since I don't use them in my day-to-day work but I'd still like to not have to do this.

I've done some Google searching, but other than finding other people with the same question, I haven't found any solutions. I'm sure Java developers and testers must also have this problem, how do they solve it?
posted by tommasz to Computers & Internet (9 answers total)
 
I suppose you could install Microsoft Virtual PC and use that to run a virtual machine with a different version of Java.
posted by le morte de bea arthur at 10:43 AM on February 3, 2009


I think you can do it by altering your PATH and JAVA_HOME environment variables to point to either the 1.4.2_06 or 6 install directories under Program Files. By default, they'd point to the 1.4.2_06 location to make IE happy, but you could have batch files that launch the apps that require Java 6 and set PATH and JAVA_HOME appropriately.
posted by zsazsa at 10:47 AM on February 3, 2009


Can't you switch between the different installed versions of the JVM in the Java preferences (probably in the Windows control panel).
posted by devnull at 10:47 AM on February 3, 2009


Response by poster: devnull, I tried that but it didn't change anything, probably because I didn't do what zsazsa suggested. There are also a ton of Java-related installed plugins in IE that I tried disabling, but that also did nothing, perhaps for the same reason.
posted by tommasz at 11:00 AM on February 3, 2009


Response by poster: I'm sure it's pitched as a cost-avoidance issue. Since we all have a standard image loaded, there's no reason to code internal applications to anything other than IE. One version means less development means less cost. The lack of security is mitigated by our strict firewall/proxy server and mandatory McAfee anti-virus.

Firefox is not forbidden, but it's also not supported. Sometimes it works for the internal sites, sometimes not.
posted by tommasz at 1:05 PM on February 3, 2009


How about running firefox with the USER_AGENT changed. Also why is the Java code failing i can see a problem if your company had coded for Java 6 and you had an earlier version installed but older code should work with the newer ? IF not zsazsa with their batch file idea is probably best.
posted by stuartmm at 1:21 PM on February 3, 2009


The browser is going to use whatever the JAVA_HOME user/system variable is set to, so set that to point to your 1.4 install, then for the apps just have them start up with your 1.6 install. If they are standalone (like an IDE or something) change the bat file that starts them.
posted by zeoslap at 1:30 PM on February 3, 2009


How about running firefox with the USER_AGENT changed. Also why is the Java code failing i can see a problem if your company had coded for Java 6 and you had an earlier version installed but older code should work with the newer ? IF not zsazsa with their batch file idea is probably best.

Hahahah. There are a number of changes between Java 1.4 and Java 6 that actually break backwards compatibility. The ones I know of mostly live in the XML processing packages. My absolute favorite is that in 1.4, Document.toString() conveniently returned XML of the DOM object. In 6, it returns one of those worthless handle address--to get XML, you have to go through the transform package.

There are many others, though.
posted by Netzapper at 3:29 PM on February 3, 2009


The Java Control Panel has options to select what versions of Java are available for applets and separately for Java Web Start applications. Effectiveness is variable.
posted by vsync at 4:42 PM on February 3, 2009


« Older Plot Mandelbrot Set in Java   |   Taxes and Dachle and Geitner Newer »
This thread is closed to new comments.