Previously I am using Java 1.8 in my machine. But now i need to use Java 1.6. So I changed the below values in system environment variables.
U:\POC\jdk1.6.0_31\bin\ or %JAVA_HOME%/bin
Also I restarted my system
Even after that it is displaying java version as 1.8 in my command prompt.
Can anyone advice on how to resolve this issue?
I’ve not used Windows in a long time but I remember that there are 2 sections of environment variables. One system scope, and the other user scope.
- Check that nothing in the system scope is defining a
- Like @Stephen C said, post the output of
- Check that nothing comes before
%JAVA_HOME%/binin the path that may contain the
javaexecutable. Things like Oracle client come with Java. You can always put
%JAVA_HOME%/binin front of the path instead of at the end.
@David Santiago’s answer is a bad idea. If you let the IDE do your job, you won’t be able to troubleshoot when there is a problem.
Answered By – Abhijit Sarkar