Reputation: 319
This is what my CMD looks like. I have JDK 11 but for some reason it shows my version is 1.8. My netbeans uses JDK11. How do I update it from version 1.8?
and Path
Upvotes: 3
Views: 3850
Reputation: 1
Go to Environment variables > JAVA_HOME > Edit > paste the path of your JDK 11 here instead of JDK-8 path > Go to PATH and now paste the path of the bin folder of JDK 11 here and press ok
You can check the version of JDK now over CMD.
Explanation:
ClassPath decides where all commands will be present.Java code should be locatable & is located using classPath where you specify root directories of all projects that you want to run.
Upvotes: 0
Reputation: 496
Windows will run whatever Java is first in your PATH
. Therefore, you might want to check your environment variables and also check JAVA_HOME
, when you're at it.
Upvotes: 6