Переопределение nativePath в PublicURLClassLoader

This commit is contained in:
Gravit 2018-10-23 19:59:39 +07:00
parent 82858575c7
commit 2e0e187ffc
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -8,7 +8,7 @@
public class PublicURLClassLoader extends URLClassLoader { public class PublicURLClassLoader extends URLClassLoader {
@LauncherAPI @LauncherAPI
public static ClassLoader systemclassloader = ClassLoader.getSystemClassLoader(); public static ClassLoader systemclassloader = ClassLoader.getSystemClassLoader();
public String nativePath;
@LauncherAPI @LauncherAPI
public static ClassLoader getSystemClassLoader() { public static ClassLoader getSystemClassLoader() {
return systemclassloader; return systemclassloader;
@ -62,6 +62,11 @@ public PublicURLClassLoader(URL[] urls) {
public PublicURLClassLoader(URL[] urls, ClassLoader parent) { public PublicURLClassLoader(URL[] urls, ClassLoader parent) {
super(urls, parent); super(urls, parent);
} }
@Override
public String findLibrary(String name)
{
return nativePath.concat(name);
}
@Override @Override
public void addURL(URL url) { public void addURL(URL url) {