diff --git a/build.sbt b/build.sbt index 1c4248fd..86a6c263 100644 --- a/build.sbt +++ b/build.sbt @@ -86,8 +86,9 @@ OsgiKeys.additionalHeaders := Map( "org/xerial/snappy/native/Windows/x86_64/snappyjava.dll;osname=win32;processor=x64", "org/xerial/snappy/native/Windows/x86_64/snappyjava.dll;osname=win32;processor=amd64", "org/xerial/snappy/native/Windows/x86/snappyjava.dll;osname=win32;processor=x86", - "org/xerial/snappy/native/Mac/x86/libsnappyjava.dylib;osname=macosx;processor=x86", + "org/xerial/snappy/native/Mac/x86/libsnappyjava.jnilib;osname=macosx;processor=x86", "org/xerial/snappy/native/Mac/x86_64/libsnappyjava.dylib;osname=macosx;processor=x86-64", + "org/xerial/snappy/native/Mac/aarch64/libsnappyjava.dylib;osname=macosx;processor=aarch64", "org/xerial/snappy/native/Linux/x86_64/libsnappyjava.so;osname=linux;processor=x86-64", "org/xerial/snappy/native/Linux/x86_64/libsnappyjava.so;osname=linux;processor=x64", "org/xerial/snappy/native/Linux/x86_64/libsnappyjava.so;osname=linux;processor=amd64", diff --git a/src/main/java/org/xerial/snappy/SnappyBundleActivator.java b/src/main/java/org/xerial/snappy/SnappyBundleActivator.java index dec838c1..cd9d0ab7 100755 --- a/src/main/java/org/xerial/snappy/SnappyBundleActivator.java +++ b/src/main/java/org/xerial/snappy/SnappyBundleActivator.java @@ -51,7 +51,9 @@ public void start(BundleContext context) throws Exception { String library = System.mapLibraryName(LIBRARY_NAME); - if (library.toLowerCase().endsWith(".dylib")) { + String osArch = System.getProperty("os.arch"); + + if (library.toLowerCase().endsWith(".dylib") && "x86".equals(osArch)) { // some MacOS JDK7+ vendors map to dylib instead of jnilib library = library.replace(".dylib", ".jnilib"); }