updated bundle activitor to handle dynlib/jnilib issues on macos jdk7+
This commit is contained in:
parent
da6263ff03
commit
3e674a0f3c
|
@ -48,8 +48,14 @@ public class SnappyBundleActivator implements BundleActivator
|
|||
* that the library is available on the path based on this {@link Bundle}'s {@link Manifest}.
|
||||
*/
|
||||
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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue