2007-07-30 23:19:05 +00:00
|
|
|
package java.lang;
|
|
|
|
|
2007-08-10 23:45:47 +00:00
|
|
|
import java.net.URL;
|
|
|
|
import java.net.MalformedURLException;
|
|
|
|
|
2007-07-30 23:19:05 +00:00
|
|
|
public class SystemClassLoader extends ClassLoader {
|
|
|
|
private Object map;
|
|
|
|
|
|
|
|
protected native Class findClass(String name) throws ClassNotFoundException;
|
|
|
|
|
|
|
|
protected native Class findLoadedClass(String name);
|
2007-08-10 23:45:47 +00:00
|
|
|
|
|
|
|
private native boolean resourceExists(String name);
|
|
|
|
|
|
|
|
protected URL findResource(String name) {
|
|
|
|
if (resourceExists(name)) {
|
|
|
|
try {
|
2007-08-19 19:45:51 +00:00
|
|
|
return new URL("resource:" + name);
|
2007-08-10 23:45:47 +00:00
|
|
|
} catch (MalformedURLException ignored) { }
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
2007-07-30 23:19:05 +00:00
|
|
|
}
|