Issue
I tried to Upgrade Java on my laptop (running Windows 10) from Java 10 to Java 11. I downloaded and installed the Java 11 SDK from the Oracle website and then I added the address of the bin folder into the Path System Variable and changed JAVA_Home to point to the new jdk file.
Path System Variable looks like this:
....;C:\Program Files\Java\jdk-11.0.1\bin
And JAVA_HOME:
C:\Program Files\Java\jdk-11.0.1
Still, when I open CMD and run: java --version
I get Java 10 although with javac --version
I get Java 11.
I followed the steps described here: How to install OpenJDK 11 on Windows?
Solution
With the comment's help and looking at this question I found out that the problem was that the C:\ProgramData\Oracle\Java\javapath
appeared before the Java 11 path, so I moved it to the bottom and now both java
and javac
point correctly to Java 11.
Here's the requested screenshot of the Path variable after I made the change in order:
Answered By - Nena
Answer Checked By - Cary Denson (JavaFixing Admin)