mirror of
https://github.com/xerial/snappy-java.git
synced 2025-04-08 19:35:08 +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
@ -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…
x
Reference in New Issue
Block a user