I think it is good to make sure you type in the path correctly. It want to tell you about .bat file. I will automate your coding.
Open Notepad, type in:
javac C:\Program Files\Java\jdk1.6.0\bin\javac MyClass.java
save that file as "compile.bat" into your folder with your current work project.
Start another file in Notepad, type in:
java .\;C:\ProgramFiles\Java\jdk1.6.0\bin\java MyClass
Note, just after java the .\; that is look here first, java, this folder. The semicolon is the DOS end-of-line. The rest is the path to the java engine, a space the Java program you compiled.
Save that as "run.bat" in the same folder.
Now, you can double-click the .bat file. If it fails, make sure the path points to the bin folder inside JDK folder. It can be tricky. You see, in DOS the folders are \ (backslash). In java, in the internet, everywhere else, the path folders are "/".
If you .bat files work, great. Change your environment variable. You can then make your next bat files without the path.
javac MyJava.java
java MyJava
And finally, the NetBeans IDE does this bat file automatically for you every time you run code. NetBeans is a great editor, colors the keywords and helps you code.