I'm having a problem with determining what version of java am I using:)
cmd.exe is using java.exe from C:\WINDOWS\system32 as specified in Path environment variable.
C:\WINDOWS\system32>java.exe -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode)
But in windows when I right-click on that file and select Properties->Version->Full Version it says 1.6.0_22-b04.
Why?
2 Answers 2
This means you have two installations. Check your c:\program files\Java folder. Also check your PATH environment variable - it should point to the correct path.
Comments
Change to a directory which is not in your PATH environment variable and run java -version. Note that the current directory always is the first entry in PATH.
3 Comments
C:\Windows\System32which for windows../someBinary is confusing at first ("why do I need to specify the directory if I'm already in it?") but avoids problems later.