I have done the following:
1. Set the environment variable JAVA_HOME:
2. Add Java 1.6.0_45 and disable Java 1.8.0_66 in Java Runtime Environment Settings under Configure Java:
Unfortunately, the Java is still 1.8.0_66:
>java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b18, mixed mode)
Could anyone offer a tip on this?
Edit:
Per David's suggestion, the following is the Java related contents from the output of command PATH (the entire output is super long, I hope the following is sufficient for this question.):
PATH=C:\ProgramData\Oracle\Java\javapath; ... C:\Program Files\Java\jdk1.6.0_45\bin
Best Answer
java -version
is running the wrong version of java.Diagnostics:
Conclusion:
From the above output we can deduce that
C:\ProgramData\Oracle\Java\javapath
is1.8.0_66
.You need to change your
PATH
to putC:\Program Files\Java\jdk1.6.0_45\bin
first.You also need to clean up your path. My guess is you have a lot of duplicate entries.