I have started on a project that specifically says that use 1.6 JDK to prevent form test failings.I came across a peculiar behavior while I tried to change JDK from 1.7 to 1.6.Even though I changed environment variables form 1.7 to 1.6 JDK version, When I run \[code\]java.exe -version\[/code\] or \[code\]java -version\[/code\] in \[code\]cmd\[/code\], it still gives the earlier version. But when I run \[code\]javac -version\[/code\] it gives the 1.6 version. What I did so far was,In User Environment variables,
- classpath to \[code\]C:\Program Files\Java\jdk1.6.0_43\[/code\](JDK installation path)
- Added java_home variable and changes path to \[code\]C:\Program Files\Java\jdk1.6.0_43\[/code\](JDK installation path)
- Changed path to \[code\]C:\Program Files\Java\jdk1.6.0_43\bin\[/code\](Java bin)
- Added \[code\]C:\Program Files\Java\jdk1.6.0_43\bin\[/code\] to \[code\]CLASSPATH\[/code\]
- Created JAVA_HOME Variable and added \[code\]C:\Program Files\Java\jdk1.6.0_43\bin\[/code\]