how to echo java_home in windows cmd
echo %JAVA_HOME%
find java_home path in cmd
Verify JAVA_HOME
Open a Command Prompt window (Win⊞ + R, type cmd, hit Enter).
Enter the command echo %JAVA_HOME% . This should output the path to your Java installation folder. If it doesn't, your JAVA_HOME variable was not set correctly.
Set the JAVA_HOME variable via the command line
> Open Command Prompt (make sure you Run as administrator)
Click on start Button >> type ' cmd 'in search Box >> Press Right mouse button on cmd >>
In a pop-up select " Run as administrator "
> COPY THIS COMMAND & SET YOUR JDK INSTALLED PATH IN DOUBLE QUOTES (" ") :
setx -m JAVA_HOME "C:\Progra~1\Java\jdk1.8.0_XX"
NOTE: If the path contains spaces, use the shortened path name.
> Restart Command Prompt to reload the environment variables
then use the following command to check the its been added correctly.
echo %JAVA_HOME%
> You should see the path to your JDK (or JRE) installation.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us