Merge pull request #76 from trajar/develop

Fix - Updated bundle activator to handle dynlib/jnilib issues on MacOS JDK7+
This commit is contained in:
Taro L. Saito 2014-07-04 09:49:35 +09:00
commit d85724ad6d

View File

@ -49,7 +49,13 @@ public class SnappyBundleActivator implements BundleActivator
*/ */
public void start(BundleContext context) throws Exception public void start(BundleContext context) throws Exception
{ {
System.loadLibrary(System.mapLibraryName(LIBRARY_NAME)); String library = System.mapLibraryName(LIBRARY_NAME);
if (library.toLowerCase().endsWith(".dylib"))
{
// some MacOS JDK7+ vendors map to dylib instead of jnilib
library = library.replace(".dylib", ".jnilib");
}
System.loadLibrary(library);
SnappyLoader.setApi(new SnappyNative()); SnappyLoader.setApi(new SnappyNative());
} }