Reputation: 6132
I installed jdk-14.0.1_windows-x64_bin.exe
from https://www.oracle.com/java/technologies/javase-jdk14-downloads.html.
I added C:\Program Files\Java\jdk-14.0.1\bin
to my PATH
and JAVA_HOME
variables.
After this I start a new command prompt and type java -version
, and I see the list below, but I don't see java version "14.0.1"
, why not?
java version "1.8.0_251" Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
I already checked this post.
Upvotes: 2
Views: 196
Reputation: 2177
when you add a new version of Java to your PATH
to use it as default you should also make sure that it is the only one in your PATH
.
in this case, you already had Java 8 in your PATH
and it was being used as default instead of the new Java 14, so the solution is to remove Java 8 from the PATH
.
Upvotes: 3