JAVA_HOME is not recognized as an internal/external command

13,746

Change the path value %JAVA_HOME%\bin, instead of set this

C:\Program Files\Java\jdk1.8.0_25\bin

After setting that, open command prompt and check whether you have set JAVA_HOME correctly.

echo %JAVA_HOME%
java

echo %JAVA_HOME% will print the location where java installed and java will show the usage of java.

See here how to set JAVA_HOME

Share:
13,746
Manuel Velasco
Author by

Manuel Velasco

Updated on August 21, 2022

Comments

  • Manuel Velasco
    Manuel Velasco over 1 year

    I've tried just about everything but it will not recognize it.

    I have the latest version of JDK installed, the path is located at "C:\Program Files\Java\jdk1.8.0_25". This is what I'm using for my "variable value" field when I add the new variable "JAVA_HOME"..

    I also have a %JAVA_HOME%\bin; in my path variable. I've restarted multiple times, making small changes..

    Help me :(

    Keep in mind I don't have much of a clue of what I'm doing.. So I could be going about it completely wrong.. Running it in cmd