Reputation: 67
I have Java 7 in my machine from a long time .And now I have installed Java 8 too .The problem is even after changing the JAVA_HOME & path variable to point to jdk 8, I still get jdk 7 in the classpath.
Snapshot of the environment variables below
But I get the below when checking the version in windows.Is there anything else I should do to get it pointed to jdk8?
C:\Users>java -version
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
Snapshot of the environment variables below
Upvotes: 1
Views: 396
Reputation: 4520
java.exe, Javac.exe and javaw.exe
from system32oraclePath
like some text in path of system variable(from jdk8 it will create a new system variable when installing)Upvotes: 1
Reputation: 319
Go in control panel and type java in the search box type java. Click on the link on the java label. Then click on tab java. You will see the active runtimes. Untick the one you don't need.
Upvotes: 0
Reputation: 529
Four things that come to mind:
JAVA_HOME
and PATH
variables at system level.where java
in your cmd to see where Windows finds Java(s).PATH
variable? Looking at your snapshot I it to contain at least %JAVA_HOME%\bin
.Upvotes: 0
Reputation: 1
Can you check in your System variables that in the PATH variable, there is no path to your JDK 7?
Even if you define or override a Path variable in the "user" variables, Windows just concatenate the system variables with the user ones, in this order.
So if there is a path to your JDK 7 in System path, you will have this kind of value : PATH=;.....;D:\java\jdk8;%MAVEN_HOME%
Upvotes: 0