Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (7k points)

I have installed java 14 in my system at the following location. C:\Program Files\Java\jdk-14.0.1 when I run java -version it is still showing java version “1.8.0_251”. How do I change that to point to Java 14.

I have set JAVA_HOME to C:\Program Files\Java\jdk-14.0.1\bin and appended it to Path of system variable but it is still showing the older version.

Can someone help me with this?

1 Answer

0 votes
by (13.1k points)

When you call java -version the Path present in the system variable will give the older version because you have appended it which would the system to return the older version as its Path is present before the new one. Try to put the Path of the new version in front of the older version’s Path. This might solve your problem.

Want to learn Java? Check out the Java course from Intellipaat.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Oct 13, 2019 in Java by Ritik (3.5k points)

Browse Categories

...