This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark " Watch " New topic
Author

'JAVAC' is not recognized

nilanil kumar
Greenhorn

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
Bartender

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 <filename.java>
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


Thnx
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.
 
 
subject: 'JAVAC' is not recognized