Kaydet (Commit) d386b1da authored tarafından Jürgen Schmidt's avatar Jürgen Schmidt

#124315# insert check for libs with jnilib extension on mac os

üst 51dac483
......@@ -48,7 +48,17 @@ public final class NativeLibraryLoader {
library name is system dependent
*/
public static void loadLibrary(ClassLoader loader, String libname) {
String syslibname = System.mapLibraryName(libname);
File path = getResource(loader, System.mapLibraryName(libname));
if (path == null) {
// check special jni lib extension on Mac
if (syslibname.contains("dylib")) {
syslibname = syslibname.replace("dylib", "jnilib");
}
path = getResource(loader, syslibname);
}
if (path == null) {
// If the library cannot be found as a class loader resource, try
// the global System.loadLibrary as a last resort:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment