Calling java -version
from the command line causes cmd.exe to search the "known" directories. Known means the PATH environment variable. It seems that your PATH contains the java 1.3 bin
, not 1.6.
JAVA_HOME is another variable that is used (for example, and not only) using java wrappers or scripts that execute some Java files.
Try to do this:
SET JAVA_HOME=C:/Program Files/Java/jdk1.6.0_32 %JAVA_HOME%/bin/java -version
Add quotation marks if necessary.
source share