String CompilePath = \"abc.java\";
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
String classpath = System.getProperty(\"java.class.path\");
System.s
You cannot depend on java.class.path to be set to anything in particular.
Java establishes this variable when it launches the entire JVM containing your servlet container. As it creates many different class loaders for many different other purposes, it does not change it. It cannot. There is only one value of java.class.path for the entire process, but there can be many different webapps, and indeed many different class loaders inside each webapp.
You will need your own explicit configuration mechanism to communicate the class path for this sort of compilation stuff, and to use getRealPath to construct the pathnames.