Monday, 12 September 2016

Javac is not recognised as internal or external command...

Whenever we try to compile .java file to .class file we often get this message.
It means that java compiler (javac.exe) is not found by OS in the current path.

So we need to tell OS where we have stored javac.exe.

Hence, Execute below command
set PATH ="C:\Program Files (x86)\Java\jdk1.8.0_31\bin"
where bin folder contains javac.exe

Now OS knows where javac is present and it will compile the java files successfully.

No comments:

Post a Comment