File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes 'JAVAC' is not recognized Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark " Watch " New topic

'JAVAC' is not recognized

nilanil kumar

Joined: Mar 09, 2005
Posts: 9
what it means when compile program
'JAVAC' is not recognized as an internal or external command,
operable program or batch file.
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

It means that either you don't have the javac compiler installed on your machine, or more likely you have not set up your PATH environment variable to include the your JDK's bin directory. You need to tell your operating system where to look for an excecutable called javac and you do that by setting the PATH.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Nischal Tanna
Ranch Hand

Joined: Aug 19, 2003
Posts: 182
u will have to either do 1 of the foll things :

1. execute set path=%path%;<bin path of jdk>at the command prompt where u r using javac <>
for e.g. : if ur jdk home is c:\jdk1.5

command will be : set path = %path%;c:\jdk1.5\bin

2. set the value of the environment variable "path"
value of the path variable will be same as above : path = %path%;c:\jdk1.5\bin

K Riaz
Ranch Hand

Joined: Jan 08, 2005
Posts: 375
Just add, if you're running Win2K or XP, you can set the path by right clicking on "My Computer" > System > Advanced > Environment Variables.
I agree. Here's the link:
subject: 'JAVAC' is not recognized
It's not a secret anymore!