mirror of
https://github.com/xerial/snappy-java.git
synced 2025-07-26 23:44:10 +02:00
Merge pull request #76 from trajar/develop
Fix - Updated bundle activator to handle dynlib/jnilib issues on MacOS JDK7+
This commit is contained in:
commit
d85724ad6d
@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user