Meaningless Drivel is fun!*
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
Author

Javac and WIn2000

Mike Shn
Ranch Hand

Joined: May 26, 2001
Posts: 149
Hello
I have WIn2000(Professional) and I installed JDk 1.3. I wrote small JAva program on notepad than save as Hello.java. After that I open cmd.exe and wrote javac Hello.java 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?
Thanks
Mike
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: http://aspose.com/file-tools
 
subject: Javac and WIn2000