diff --git a/java/org/rocksdb/NativeLibraryLoader.java b/java/org/rocksdb/NativeLibraryLoader.java index 367c4dc5b7..26a26bbca2 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 1158908a2a..7bb42ace75 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(); }