我正在尝试编译一个动态创建的类,该类具有动态创建的其他类的依赖项。但是我得到了classNotFound异常
int errorCode = com.sun.tools.javac.Main.compile(new String[] { "-classpath", "bin", "-cp",
".;"+PATHCONST.TOOLS + ";" + PATHCONST.QUARTZ + ";" + PATHCONST.JUNIT + ";" +
+ System.getProperty("java.class.path"),
"-d", PATHCONST.TOMCAT_CLASSES_PATH, className });
ClassLoader cload = new URLClassLoader(new URL[] { new File(ClassFilePath).toURI().toURL() },
Thread.currentThread().getContextClassLoader());
System.out.println("errorcode and cload : "+errorCode+" "+cload);
Class c = Class.forName(fileN);
Object h = c.newInstance();
Class<?> c1 = cload.loadClass(h.getClass().getName());