I would like to add that the -classpath option overrides the existing classpath and uses only the jar mentioned in the command line. I had problems while compiling a servlet with 2 jar files. I added this one to the classpath in windows to overcome the problem.