One slight improvement on that.
Create a new environment variable called JAVA_HOME and set it to the path to your JDK, without the bin folder (e.g. C:\jdk1.6.0_05 or C:\Program Files\jdk1.6.0_05). The change the PATH variable as Christophe said, but instead of adding the JDK bin folder, add it as follows: "%JAVA_HOME%\bin" (include the quotes).
That way, not only is your environment set up for a possible future installation of other tools such as Apache
Ant, but it also allows you to change the much shorter value of JAVA_HOME instead of the long PATH when you upgrade to another version. Remember, PATH includes many paths, and the JDK could be somewhere in the middle.