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 and WIn2000 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Javac and WIn2000" Watch "Javac and WIn2000" New topic

Javac and WIn2000

Mike Shn
Ranch Hand

Joined: May 26, 2001
Posts: 149
I have WIn2000(Professional) and I installed JDk 1.3. I wrote small JAva program on notepad than save as After that I open cmd.exe and wrote javac on the next line java HEllo. But It gave me the error:
'javac' is not recognized as an internal or external command,
operable program or batch file.Does anybody can help me?
Joe McGuire
Ranch Hand

Joined: Mar 19, 2001
Posts: 293
Most likely a path problem.
Right click on your "My Computer" icon to open up the System Properties box. Select the Advnaced tab, where you'll see two window panes. The bottom is the System variables pane. Click on the Path variable, and hit the Edit... button. Append ";C:\jdk1.3\bin;" (assuming you've installed the jdk in the C: directory). Click okay, reopen your command prompt and try it again.
Another way is to make a "set environment" batch file.
In notepad, enter the following text:

set PATH=C:\jdk1.3\bin;%PATH%

Again, assuming your jdk is in the C root.
Save this file as "setEnv.cmd" (or anything with a .cmd or .bat ending), and run it before you need to do any compiling.
I agree. Here's the link:
subject: Javac and WIn2000
It's not a secret anymore!