mirror of
https://github.com/corda/corda.git
synced 2025-06-16 06:08:13 +00:00
implement jar and file URL stream handlers
This commit is contained in:
@ -34,12 +34,13 @@ public class SystemClassLoader extends ClassLoader {
|
||||
return c == null ? null : getClass(c);
|
||||
}
|
||||
|
||||
private native boolean resourceExists(String name);
|
||||
private native String resourceURLPrefix(String name);
|
||||
|
||||
protected URL findResource(String name) {
|
||||
if (resourceExists(name)) {
|
||||
String prefix = resourceURLPrefix(name);
|
||||
if (prefix != null) {
|
||||
try {
|
||||
return new URL("resource:" + name);
|
||||
return new URL(prefix + name);
|
||||
} catch (MalformedURLException ignored) { }
|
||||
}
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user