DEV Community

Calin Baenen
Calin Baenen

Posted on

Java didn't update?

I tried to download Java 15.0.1, and when to command prompt, and checked java -version, it said the current installed version was 14.0.2.

Does anyone know why this is?

Thanks!
Cheers!

Top comments (6)

Collapse
 
breadcentric profile image
Breadcentric

I recommend that you use SDKMAN: sdkman.io/install
This is a tool that manages JAVA_HOME and Java versions for you. It's especially handy when your working with multiple projects in different phases of their lives.
I simply run sdk use java 1.15.xyz-zulu or whichever OpenJDK build I choose to use and I'm sorted.

Collapse
 
hunter profile image
Hunter Henrichsen

I'd check where your JAVA_HOME path variable points, as well as which Java executable you have in your path.

Collapse
 
baenencalin profile image
Calin Baenen

How do I check / set the JAVA_HOME variable (preferably from Command Prompt (Windows 10; Version:*).

Collapse
 
hunter profile image
Hunter Henrichsen

You can run echo %JAVA_HOME% to check the variable. I normally edit them through the Environment Variables dialogue under System Properties > Advanced, as I'm less prone to wiping out important variables that way. You also may want to restart your computer if you edit the system path.

Thread Thread
 
thefern profile image
Fernando B 🚀

You don't need to restart your computer, just restart cmd prompt. Just make sure your new java / bin folder is on PATH, and not multiple java versions.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.