helloworldapp problem

So i copy and paste the code on notepad, save it as "HelloWorldApp.java", and i put it on my desktop and so i change the directory on command prompt to the desktop and i type in dir i see my HelloWorldApp.java so then i type javac HelloWorldApp.java.

so i update the path variable (XP if it helps) in the user paths, name it java and make the directory to the C:\Program Files\Java\jdk1.5.0_06\bin and this folder had all these exes of java stuff. so then i type javac HelloWorldApp.java in again and the same "not recognized as int ext command, bath file executable file" message comes up.

i tried then to type this instead C:\Program Files\Java\jdk1.5.0_06\bin\javac HelloWorldApp.java but then it said that C:\ Program wasnt recognized?

Please help, this is getting incredibly frustrating.

[818 byte] By [pssssta] at [2007-10-2 11:11:34]
# 1

To set the path, so that you can type just "javac ..." and have it compile, read #5 in Java's JDK Installation Instructions, available from where you downloaded the JDK - click the installation link.

To run the program, once your java file compiles, change the cmd prompt to the directory that contains the .class file that was created by javac. Type the following:

java -classpath . <nameOfYourClass>

IMPORTANT: Include the period and surrounding spaces.

If you want to learn how to set and use the classpath variable, read about the classpath here:

http://java.sun.com/j2se/1.5.0/docs/tooldocs/index.html#general

ChuckBinga at 2007-7-13 3:54:37 > top of Java-index,Developer Tools,Java Compiler...
# 2
Try putting your command in quotes:"C:\Program Files\Java\jdk1.5.0_06\bin\javac" HelloWorldApp.javathe space in "Program Files" breaks it otherwise.
killerCodingNinjaMonkeya at 2007-7-13 3:54:37 > top of Java-index,Developer Tools,Java Compiler...