Prefer local libraries
This commit is contained in:
parent
d1872a0198
commit
0ba97b2c45
@ -65,10 +65,6 @@ public class LoadLibrary {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void loadLibrary(String libname) throws Throwable {
|
private static void loadLibrary(String libname) throws Throwable {
|
||||||
if (loadSysLibrary(libname)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Arch arch = getCpuArch();
|
Arch arch = getCpuArch();
|
||||||
Os os = getOs();
|
Os os = getOs();
|
||||||
|
|
||||||
@ -83,6 +79,9 @@ public class LoadLibrary {
|
|||||||
try {
|
try {
|
||||||
loadJarLibrary(libname, arch, os);
|
loadJarLibrary(libname, arch, os);
|
||||||
} catch (IOException | CantLoadLibrary | UnsatisfiedLinkError e) {
|
} catch (IOException | CantLoadLibrary | UnsatisfiedLinkError e) {
|
||||||
|
if (loadSysLibrary(libname)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
throw new CantLoadLibrary().initCause(e);
|
throw new CantLoadLibrary().initCause(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user