How can load uer-defined class by default ClassLoder???
try {
Class.forName(className);
} catch (ClassNotFoundException cnfe) {
URL[] urls = new URL[]{---classPath---};
try {
URLClassLoader cl = new URLClassLoader(urls);
Class c = cl.loadClass(className);
c.newInstance(); //Error.
Class.forName(className, false, cl); //ok.
Class.forName(className); //Error.
} catch (Exception e) {
throw cnfe;
}
}
3ks