From c4519c777f7dcd996c5bd8d726877bda3f0e65ac Mon Sep 17 00:00:00 2001 From: Chris Riccomini Date: Mon, 29 Sep 2014 10:42:00 -0700 Subject: [PATCH] fix mis-named jar in JNI loader --- java/org/rocksdb/NativeLibraryLoader.java | 2 +- java/org/rocksdb/util/Environment.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/java/org/rocksdb/NativeLibraryLoader.java b/java/org/rocksdb/NativeLibraryLoader.java index 367c4dc5b..26a26bbca 100644 --- a/java/org/rocksdb/NativeLibraryLoader.java +++ b/java/org/rocksdb/NativeLibraryLoader.java @@ -8,7 +8,7 @@ import org.rocksdb.util.Environment; * The shared library is extracted to a temp folder and loaded from there. */ public class NativeLibraryLoader { - private static String sharedLibraryName = Environment.getJniLibraryName("rockdsb"); + private static String sharedLibraryName = Environment.getJniLibraryName("rocksdb"); private static String tempFilePrefix = "librocksdbjni"; private static String tempFileSuffix = "." + Environment.getJniLibraryExtension(); diff --git a/java/org/rocksdb/util/Environment.java b/java/org/rocksdb/util/Environment.java index 1158908a2..7bb42ace7 100644 --- a/java/org/rocksdb/util/Environment.java +++ b/java/org/rocksdb/util/Environment.java @@ -24,9 +24,9 @@ public class Environment { public static String getSharedLibraryName(String name) { if (isUnix()) { - return String.format("lib%s.so", name); + return String.format("lib%sjni.so", name); } else if (isMac()) { - return String.format("lib%s.dylib", name); + return String.format("lib%sjni.dylib", name); } throw new UnsupportedOperationException(); } @@ -34,9 +34,9 @@ public class Environment { public static String getJniLibraryName(String name) { if (isUnix()) { String arch = (is64Bit()) ? "64" : "32"; - return String.format("lib%s-linux%s.so", name, arch); + return String.format("lib%sjni-linux%s.so", name, arch); } else if (isMac()) { - return String.format("lib%s-osx.jnilib", name); + return String.format("lib%sjni-osx.jnilib", name); } throw new UnsupportedOperationException(); }