I guess you are using Windows as your OS.
Well classpath is used when your
java code is compiling or executing.
You need to set path to bin folder of jdk
Example assume you jdk is installed in c:\jdk1.4
Then polling to set the path
Set path=%path%;c:\jdk1.4\bin;