Java Error javac is not recognized as an internal or external command

Senin, 03 Februari 2014

So you are trying to compile your Java source file and getting "'javac' is not recognized as an internal or external command". If this is your first Java program or HelloWorld than I suggest to go through How to compile and run HelloWorld in Java because that explains what do you need before you compile and run any Java program. If you have crossed that level and knows about How to set PATH in Java then there is something wrong while setting PATH in Java. Anyway let's see when does you get this error and from where does 'javac' is not recognized as an internal or external command comes. This is an standard error in Windows command line when you type a command which is not available in System PATH, here javac command which is used to compile Java source file and produces class files are not in PATH. Best way to verify this is executing following command :

# echo %PATH%

If you see your JDK installation folder or JAVA_HOMEin PATH and included bin directory which contains all java binaries including javac and java commands which is used to compile and run Java program. Most likely your PATH may not have JDK/bin in PATH, if that's the case just include bin folder of JDK in your PATH. See how to set PATH for Java in Windows for step by step guide.
Read more »

Related Posts by Categories

0 komentar:

Posting Komentar