Cannot compile file
First timer trying to learn Java. Have Java JDK version 1.5.0_04 and in trying to compile my first program; I get this error message:
'javac' is not recognized as an internal or external command, operable program or batch file.
I have followed all the directions to the letter in the book that I am using "Programming with Java in 24 Hours".
Running Windows XP Home Edition on a Compaq Presario 700 laptop.
Am at a lost as what to do. Need help!
[478 byte] By [
fishboya] at [2007-11-27 8:10:26]

Reason that I can think of is quite simple, you don't have your java path set.
First check following things:
1. Do you have JDK installed?
2. write javac on command line and enter. If it shows a message like "not recognized as any command, than probably you haven't set classpath for java home directory.
3. Set your class path using following directions:
4. Go to my computers -->right click-->properties-->advance-->environment variables. A window opens.
5. On the bottom side, click on path and then click on edit.
6. Append this string to variable Value text box : ";C:\Program Files\Java\jdk1.5.0_04\bin;"
Your program should compile properly after that.
If it doesn't work correctly, copy the variable value and post it here.
ya everyone seen to be correct here saying about the class path...
just set JAVA_HOME="the path where your jdk is installed" in the system variables so that any user whoever will log in can compile java...if u set in user variable then only specefic user will be able to compile java...for eg..my java home is C:\jdk1.5.0_06....
then set path="your bin directory in JAVA_HOME" again in the system variables...for eg.."C:\jdk1.5.0_06\bin"...
Then if u want u can set classpath=" JAVA_HOME/lib/tools.jar"... but that is mandatory.....