and complie like this which takes all jar in the folder or give path
javac -cp :\* test.java
java -cp :\* test
There are two things wrong with this
1. The JDK bin directory does not contain any jar files or classes so does not need to be in the CLASSPATH. You probably do need it in your PATH environment variable.
2. There is no point in setting a CLASSPATH environment variable if you are going to use the -cp option, as this will cause the environment variable to be ignored.