Change default java installation
<p>I have many Java versions installed on a Windows 7 machine. Some of them are 32 bits, some are 64 bits. Now as default it starts one of those last versions (1.7 64 bits). How do I tell  my Windows 7 machine to use another version of Java? One of the reasons is that I'm developing a JNI project from Microsoft Visual Studio C++ - it uses also java 1.7 64 bits.</p>

<p>Best regards,
Andrej</p>

<p>I have set: </p>

<p>User variable:
JAVA_HOME=C:\j2sdk1.4.2_04
PATH=%JAVA_HOME%\bin;%PATH%</p>

<p>and system variable:
JAVA_HOME=C:\j2sdk1.4.2_04
PATH=...a_lot_of_paths...;%JAVA_HOME%\bin;%PATH%</p>

<p>I had no idea which is better to set - for user or system settings. Done both.</p>

<p>System restart.</p>

<p>And...it didn't helped :(
When I run "java -version" from cmd i have java 1.7, but not java 1.4 like defined in PATH.</p>

<p>after run C:>where java
I got two results:</p>

<p>C:\Windows\System32\java.exe
C:\j2sdk1.4.2_04\bin\java.exe</p>

<p>Who let Java go to my windows directory ???!!! </p>

<p>How to deal with that?</p>
