mirror of
https://github.com/corda/corda.git
synced 2025-06-13 12:48:18 +00:00
flesh out resource URL scheme implementation
This commit is contained in:
@ -1,9 +1,23 @@
|
||||
package java.lang;
|
||||
|
||||
import java.net.URL;
|
||||
import java.net.MalformedURLException;
|
||||
|
||||
public class SystemClassLoader extends ClassLoader {
|
||||
private Object map;
|
||||
|
||||
protected native Class findClass(String name) throws ClassNotFoundException;
|
||||
|
||||
protected native Class findLoadedClass(String name);
|
||||
|
||||
private native boolean resourceExists(String name);
|
||||
|
||||
protected URL findResource(String name) {
|
||||
if (resourceExists(name)) {
|
||||
try {
|
||||
return new URL("resource://" + name);
|
||||
} catch (MalformedURLException ignored) { }
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user