
After you have installed Java, you may need to edit your PATH system variable in order to run the Java compiler and interpreter from any directory on your system.
Instructions for how to change your PATH
If you install Java to the default location, you will add a semicolon, then a space, then the location of the Java\bin directory to the END of whatever variables are already set in your PATH such as
;c:\Program Files\java\jdk1.6.0_06\bin