CLASSPATH (preferably in capital letters) is an environment which holds a value comprising of one or set of locations on a physical file system each separted by the OS specific path separator.
The classpath variable is used when compiling a .java file which may in turn make use of the classes available either directly or inside the archive (jar) file present in any of the classpath locations.
%classpath% represents the current value of the classpath variable, so set classpath=%classpath% just sets the variable to it's current value. Where it is more useful is if you want to add another directory/jar file to your classpath.
So if your current classpath is jar1.jar;jar2.jar;jar3.jar;jar4.jar;jar5.jar then typing set classpath=%classpath%;newjar.jar will change the value to jar1.jar;jar2.jar;jar3.jar;jar4.jar;jar5.jar;newjar.jar
As far as I know when you use javac or java they search for files in the directories that are in '$classspath' variable. Thats why before you use javac you need to make sure that the directory containing the java file is in your classpath.
Live Free Or Die
Our first order of business must be this tiny ad:
a bit of art, as a gift, the permaculture playing cards