Tuesday, 4 August 2015
HOW TO RESOLVE ‘javac is not recognized as an internal or external command’ error in Java
When you run the java program for the first time on your computer the error message ‘javac is not recognized as an internal or external command’ error in Java will be displayed because you have not set a complier to your program.
JAVAC is the compiler we use to compile the java program.
So how to add the javac to your program…
here is the tip..
Right click on the computer in the Start menu and click Properties.
then the below window will be opened…
In that click Advanced System Settings option…
Then a window will be opened in that click the ENVIRONMEN VARIABLE
Then the below will be opened
In that look for the option PATH IN THE SYSTEM VARIABLES
Suppose if no path is found you can add it by clicking on New option.
then you have to set the path of your compiler here..
So open your jdk where you have installed
Open the JDK
Then Click on BIN
Then after opening the Bin copy the path by clicking the mouse on the above path
Now come to the System variable in Environment Variable
and paste the path that you have copied in the PATH and click semi-colon(for example
C:\Program Files\Java\jdk1.7.0_79\bin; )
Then click ok.
But one more thing is remained. That is setting up your CLASSPATH It is also in the SYSTEM VARIABLES if it is not found create it by clicking on New option.
Now it is time to set the path of library ‘lib’ found in the JAVA RUNTIME ENVIRONMENT ‘JRE’
Copy the path and paste it in the CLASSPATH in SYSTEM VARIABLES
Type CLASSPATH in the Variable name: and paste the path that you have copied it in the Variable Value and click ok.
Then click OK for Environment Variable and click ok for System Properties.
Now you can confidently go and run the java program as I have posted in the last post “how to run a java program” if you have missed that click the below link to open to see How to run a Java program
http://www.millioninformations.com/2015/08/how-to-run-java-program.html
That’s it You have successfully resolved the error
javac is not recognized as an internal or external command…
If you have further queries comment below or mail me on narenblogger@gmail.com
Thank you for spending your valuable time to learn this thing…
No comments :
Post a Comment