How to set the environment variables for Java in Windows (the classpath)?
The JDK installation instructions explain exactly how to set the PATH, for different versions of Windows.
Normally you should not set the CLASSPATH environment variable. If you leave it unset, Java will look in the current directory to find classes. You can use the -cp or -classpath command line switch with java or javac.