Apps vs. IBM Java 1.5

I have IBM’s Java Runtime Environment version 5.0 installed on my laptop.

Unfortunately, it seems that some applications don’t like this very much. The issue appears to be that they look into the Windows registry to work out where the JVM is installed. The apps concerned are looking for the HKLM\SOFTWARE\JavaSoft key. If they can’t find it, they tend to become distressed and assume that no JVM is available.

Solution #1

Previously, I’d only needed to edit a batch file to fix this. Remove the calls like this:

REG QUERY "HKLM\SOFTWARE\JavaSoft\Java Runtime Environment" /v CurrentVersion

Replace with code to set JAVA_HOME to the location of your IBM JVM.

Solution #2

Today, I had a situation where an installer built using IzPack complained that it could not find Java 1.5. Not only that, but when it couldn’t find Java it tried to start Internet Explorer (not the default web browser on my system) and go off to java.com to get it for me. Not the most well-behaved application I’d ever come across.

Well, the JAVA_HOME environment variable is set. At this point, there’s nothing for it but to provide what the application is looking for. So, I created a registry entry that would point at my IBM JRE installation.

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft]

[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Runtime Environment]
"CurrentVersion"="1.5.0"

[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Runtime Environment\\1.5.0]
"JavaHome"="C:\\\\Progra~1\\\\IBM\\\\Java50"

Job done (naturally, you’ll want to edit the value of the JavaHome entry to match your IBM Java installation…)

Disclaimer: I take no responsibility for this trashing your Windows installation. It worked for me.

Technorati: , , ,

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s