On my system, I have the 64-bit version of Java 1.7 installed: C: \ Program Files \ Java \ jdk1.7.0_40
and
I have 32-bit Java 1.7 installed in: C: \ Program Files (x86) \ Java \ jdk1.7.0_02.
When I issue the java -version in CMD, it shows me:
C:\Users\Meraman>java -version java version "1.7.0_40" Java(TM) SE Runtime Environment (build 1.7.0_40-b43) Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)
I want to change the java version to 32-bit.
I tried:
1) Remote path to 64-bit installation from path variable, but CMD shows the same output for java -version .
2) I only specified the 32-bit installation path in the path variable, but CMD shows the same output for the java -version .
3) Then added the JAVA_HOME variable with the value C:\Program Files (x86)\Java\jdk1.7.0_02 , but still CMD shows the same result.
4) In the control panel Java-> Java-> Java Runtime Environment Settings-> User, I completed the wizard to find 32-bit java and turned it on only with disabling the 64-bit installation, but still the CMD shows the same output.
Please help me with this, I want to change Java to 32-bit without delaying the 64-bit version.
Additional Information:
I restarted CMD after every change to the Java path or control panel.
I have path and JAVA_HOME only as system variables, there are no such user variables.
EDIT
I deleted all java path settings in the path variable, deleted the JAVA_HOME variable, and CMD will show a 64-bit version.
C:\Users\Meraman>echo %PATH% C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Python33\;C:\Program Files ( x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system 32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1. 0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL S erver\90\Tools\binn\;C:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn\;C: \Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\ Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\; C:\Users\Meraman>javac -version 'javac' is not recognized as an internal or external command, operable program or batch file. C:\Users\Meraman>java -version java version "1.7.0_40" Java(TM) SE Runtime Environment (build 1.7.0_40-b43) Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode) C:\Users\Meraman>echo %JAVA_HOME% %JAVA_HOME% C:\Users\Meraman>
EDIT - this worked:
Setting the very first path in the path variable for 32-bit java work.
CMD is output here:
C:\Users\Meraman>echo %PATH% C:\Program Files (x86)\Java\jdk1.7.0_02\bin;C:\oraclexe\app\oracle\product\10.2. 0\server\bin;C:\Python33\;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program F iles (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wb em;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Techno logies\ATI.ACE\Core-Static;C:\Program Files (x86)\Microsoft SQL Server\80\Tools\ Binn\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program File s (x86)\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL S erver\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\; C:\Users\Meraman>javac -version javac 1.7.0_02 C:\Users\Meraman>java -version java version "1.7.0_02" Java(TM) SE Runtime Environment (build 1.7.0_02-b13) Java HotSpot(TM) Client VM (build 22.0-b10, mixed mode, sharing) C:\Users\Meraman>echo %JAVA_HOME% %JAVA_HOME% C:\Users\Meraman>where java C:\Program Files (x86)\Java\jdk1.7.0_02\bin\java.exe C:\Windows\System32\java.exe C:\Users\Meraman>