According to me CLASSPATH is nothing but telling java where it should find the class file which you have created after successful compilation of java source file.
Now to set the CLASSPATH all that you have to write on the command prompt is set CLASSPATH=path of the folder where your class file is located.
Example... Suppose i save all my .java(dot java i.e. java source file) and .class(dot class file) in My_Java folder which is present in C drive i.e. C:\My_Java.
. So i would write this on command prompt set CLASSPATH=c:\My_Java;.
Now the one which was done above was temporary i.e. once you close your command prompt you would have to set the CLASSPATH again. SO the permanent solution is
Right click on My Computer>Properties>Advanced tab>Environment variable> and set your CLASSPATH in system variables.
. I hope you are using Windows OS