Tuesday, July 19, 2016

[Java][Windows 8][Resolved] javac is not recognised as an internal or external command

Error messge: ' javac' is not recognized as an internal or external command, operable program or batch file.

Step1

Right click "This PC" icon on desktop, choose "properties"

Step2

Click "Advanced system setting" at "Control Panel\System and Security\System"


Step 3) 

Click "Environment Variables"

Step 4) 

Click PATH and then "Edit" button, insert your Java Path to the end variable value, and then click "OK". for my case value i added is "C:\Program Files\Java\jdk1.8.0_65\bin;".
Remark: at usual your java would installed in "C:\Program Files\Java\" directory by default and there is a folder , some folders identified by your installed version number. Add path of bin folder where placed within the folder : for example: C:\Program Files\Java\jdk1.8.0_65\bin

Step5
Then go to the directory where your java files to be complied and run a command:
set path=your_java_bin_path;
In my case :
set path=C:\Program Files\Java\jdk1.8.0_65\bin;
And then you can compile your java by javac command:


Reference:
http://stackoverflow.com/questions/7709041/javac-is-not-recognized-as-an-internal-or-external-command-operable-program-or

2 comments :