Image

Imagejaq wrote in Imagejava_dev

JDK update and PATH on Windows

I’ve discovered the answer to a problem we were having with things running with an unexpected version of Java. When the JDK installer is run, it can install two JREs – a ‘private’ one in the same place as you choose to put the JDK (e.g. C:\java\jdk1.5.0_04\jre on my machine), and also a ‘public’ one in a standard location (e.g. C:\Program Files\Java\jre1.5.0_04).

However there is an extra effect when installing the public JRE – it copies java.exe (and related commands) into the Windows System folder (e.g. C:\WINDOWS\system32). Since this folder usually appears at the start of the PATH environment variable it means that the copied java is likely to be picked up first by anything that uses the PATH, and this isn’t what I expected.

Taken from: http://java.sun.com/j2se/1.5.0/install-windows.html

(What, read documents before installing it? Never!)