Search code examples
javaregistryenvironment-variables

Set path for java sdk


I'm trying to set the JAVA_PATH in Windows, but I still can't access javac in command prompt.

What I've done so far is: I have added "C:\Program Files\Java\jdk1.7.0_79\bin\" to the environment variable called path. I have also checked in the registers that the string is the same there. Still, when I try to compile a program in the command prompt, or even try to echo %JAVA_HOME%, there is nothing but errors.

What am I doing wrong?

EDIT: I forgot to restart command prompt. Now it all works fine!


Solution

  • Restarting the command prompt would be enough. No need to restart the computer.