javac is not recognized as an internal or external command

If you get the error javac is not recognized as an internal or external command, here’s the fix.

Javac is not recognized as an internal or external command

1. Step Enter SystemPropertiesAdvanced.exe into the search bar:

system properties advanced

2. Step Click on the button Environment Variables…

Windows 7 Environment Variables Editing

3. Step The fieldset System variables has an item called Path, double-click on it.

System environment variables for windows 7 path

4. Step Go to the very beginning of the line and add the path to your javac file e.g.

C:\Program Files\Java\jdk1.6.0_18\bin;

Add the ; to separate the path from the other system paths.

5. Step Keep in mind you need to replace that path with your own path (simply check C:\Program Files\Java). There is a newer version of the JDK available by now. The javac file should still be in the bin folder nonetheless

After adding the path to the javac file the error ‘javac is not recognized as an internal or external command’ should no longer appear. If you still get the error, first try a reboot.

Setting PATH via CMD

If it doesn’t work, enter this into a command prompt and try again

set PATH=C:\Program Files\Java\jdk1.6.0_18\bin;%PATH%

This will add the path to your current %PATH% variable (basically the same as above).

If you still get the message javac is not recognized as an internal or external command then post a comment below.

Published: Tuesday, January 10th, 2012 Last Modified: January 10, 2012

Related Posts

Rate This Article
5 of 5 0 (100%) 1 vote