I am trying to compile a java program I found on the internet and it says that I must check if javac is installed. I installed the JDK a long time ago so it should be working but I get command not found error:
how can this be resolved?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
It looks like the
javac executable cannot be found because you did not set your
PATH environment variable to include it. This is a simple fix.
Since you are clearly using Windows XP...
PATHvariable, if there is not click "New" and create it with the variable name
PATHand the value as the path to your jdk's
bindirectory (something like
C:\Program Files\Java\jdk1.6.0\bin, it is different between installations so you will have to check
C:\Program Files\Javafor a jdk version). If it already exists but is empty, change it to the path to your jdk's
bindirectory. If it already exists but is NOT empty, append a semicolon (
;) along with the path to your jdk's
The value should look like this:
If there were previous values, it should be separated with a semicolon like so:
You need to edit the environment variables, as mentioned by John T. The built in windows environment variable editor is kind of a pain, check out Rapid Environment Editor.