What can I do when I keep receiving the error
\'javac\' is not recognized as an internal or external command, operable program or batch file
Common Error Messages from SUN Tutorial page
Even if I had
JAVA_HOME
defined%JAVA_HOME%\bin
present in my %PATH%
I still had this error. I resolved it by eliminating the JRE from my path variable. It was put before JAVA_HOME
, has no javac
. It seems Windows can't find javac
in JAVA_HOME\bin
in this case.
The link below gives a step by step explanation on how to set up java_home and path variables. JAVA_HOME setup
Make sure %JAVA_HOME%/bin is on your %PATH% (or $JAVA_HOME on the $PATH in *nix).
It means that it is not in your path. You have the following options:
1) Change to the directory where javac lives before calling it.
2) Use the full path to javac when making the call, e.g. C:\java\jdk1.6.0_12\bin\javac ...
3) Add the javac directory to the PATH environment variable
Step 4 (Update the PATH variable) of the JDK installation instructions explains what you should do to make it so that you can just type javac
in the command prompt window.