17
7
I am running Windows 7 Professional x64 and have the following Java versions installed:
x64
- C:\Program Files\Java
- jdk1.6.0_24
- jdk1.7.0_04
- jdk1.7.0_07
- jre6
- jre7
x86
- C:\Program Files (x86)\Java
- jre1.6.0_07
- jre6
- jre7
in my environment variables I have my PATH
containing C:\Program Files\Java\jdk1.6.0_24\bin
and JAVA_HOME
set to C:\Program Files\Java\jdk1.6.0_24\bin
However running java -version
reports
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
How is this the case when there is no reference to this version of Java in my Environment variables.
Any help on this issue would be great as I am trying to run Apache ANT using Java 1.6.
1Same problem here,
java.exe
was intosystem32
ANDProgramData\Oracle\javapath
– Kevin Labécot – 2014-10-08T13:55:48.583If you're wondering what to do next, you can rename the
exe
s. I renamedjava.exe
,javaw.exe
andjavaws.exe
tojava-foobar.exe
,javaw-foobar.exe
andjavaws-foobar.exe
respectively. – javatarz – 2014-12-09T09:22:29.143That increases number of places I need to check to 4: PATH, JAVA_HOME, Control Panels and now also System32... Just wow. One day the registry will become 5th. And to you I thank sir. – Jaroslav Záruba – 2017-05-07T11:29:42.673
1Wow - that's so helpful! For some reason
java.exe
is in system32. I will move it it up the path like mentioned. – Malachi – 2012-09-26T16:33:40.810