问题
I have installed java 14 in my system at following location.C:\Program Files\Java\jdk-14.0.1 but on running java -version it is still pointing to java version "1.8.0_251". How do I change that to point to Java 14.
I have set my JAVA_HOME to C:\Program Files\Java\jdk-14.0.1\bin and appended the same to Path of system variables but still it is showing the older version.
Why is it happening, a little help will be deeply appreciated. Thanks
回答1:
I found the problem, the Path system variable had entries from previously installed java versions. removing them did the trick. Thanks all for helping out with comments.
来源:https://stackoverflow.com/questions/61722180/installed-java-14-but-java-version-still-showing-old-java