l245c4l
l245c4l

Reputation: 4165

java -version different than expected

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?

Upvotes: 0

Views: 537

Answers (2)

khachik
khachik

Reputation: 28703

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.

Upvotes: 1

Bozho
Bozho

Reputation: 597006

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.

Upvotes: 4

Related Questions