import java.io.File;
import java.net.*;
public class DBIClassLoader extends URLClassLoader{
private DBIClassLoader() {
super(urls());
}
public static Class loadNewClass(String name) throws ClassNotFoundException {
return new DBIClassLoader().findClass(name);
}
private static URL[] urls() {
try {
URL[] urls = {new File(".").toURL()};
return urls;
}
catch(MalformedURLException e) {}
return null;
}
}
|