I have java 7
and java 8
both installed on my windows system under C:Program FilesJava
In the environment's path I specified the path of java 7
like this.
%JAVA_HOME%/bin
where JAVA_HOME = C:Program FilesJavajdk1.7.0_17
But when I type javac -version
it shows javac 1.7.0_17
which makes sense
but when I do java -version
it shows
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
Any idea what may be the problem here?
Edit The installed folder :
And one more thing echo %PATH%
has only one occurence of JDK
that is for java 7
and no occurence for JRE
found in it.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…