tags:

views:

290

answers:

1

I have a Windows 2008 64-bit server and I have to install a 32-bit JRE, because my Java application uses 32-bit DLLs using JNI.

Unfortunately the java.exe is installed to C:\Windows\SysWow64 and when I start a console window or a batch file the installed java.exeis not found. (Because cmd.exe is a 64-bit application and sees the 64-bit version of the system directory which has no java.exe)

How can I make the installed java.exe available to batch files and the command line without to much messing around with the system configuration, causing other problems or preventing future updates to the JRE?

+3  A: 

Don't rely on the java.exe that's in a Windows system directory; add the bin directory of your Java runtime environment to the PATH environment variable (if that's not too much "messing around with the system configuration").

Jesper
That would require updating the path variable every time a new JRE is installed to reflect the different folder name.
DR
OK, I spoke to soon. Only the *JDKs* have different folder names each release. For the JRE it's always `jre6`. So your answer is the perfect solution :)
DR