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!
Cheers!
For further actions, you may consider blocking this person and/or reporting abuse
Salad Lam -
Sina Madani -
mrityunjay saraf -
Oludayo Adeoye -
Top comments (6)
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.I'd check where your
JAVA_HOME
path variable points, as well as which Java executable you have in your path.How do I check / set the
JAVA_HOME
variable (preferably from Command Prompt (Windows 10; Version:*).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.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.