Change JDK to another version issue

KseniyaK

New Member
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)
In system Environment variables,
  • 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\]
There was a variable that is related to Java, called QLJAVA and path was set to \[code\]C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip\[/code\] and I removed that variable as well.Before I edited the \[code\]CLASSPATH\[/code\] this is the same path that was thereMy issues,[*]Why it selects 1.7 when used java -version, and why gives different result when ran \[code\]javac -version\[/code\]. or is there something wrong with what I already have done?[*]What is the \[code\]QLJAVA\[/code\] variable and what is the use of it and how didend up in system variables.?[*]Why to change to 1.6 is not there any backword compatibility.?
 
Back
Top