fix mis-named jar in JNI loader

This commit is contained in:
Chris Riccomini 2014-09-29 10:42:00 -07:00
parent b8e26615aa
commit c4519c777f
2 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ import org.rocksdb.util.Environment;
* The shared library is extracted to a temp folder and loaded from there. * The shared library is extracted to a temp folder and loaded from there.
*/ */
public class NativeLibraryLoader { 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 tempFilePrefix = "librocksdbjni";
private static String tempFileSuffix = "." + Environment.getJniLibraryExtension(); private static String tempFileSuffix = "." + Environment.getJniLibraryExtension();

View File

@ -24,9 +24,9 @@ public class Environment {
public static String getSharedLibraryName(String name) { public static String getSharedLibraryName(String name) {
if (isUnix()) { if (isUnix()) {
return String.format("lib%s.so", name); return String.format("lib%sjni.so", name);
} else if (isMac()) { } else if (isMac()) {
return String.format("lib%s.dylib", name); return String.format("lib%sjni.dylib", name);
} }
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@ -34,9 +34,9 @@ public class Environment {
public static String getJniLibraryName(String name) { public static String getJniLibraryName(String name) {
if (isUnix()) { if (isUnix()) {
String arch = (is64Bit()) ? "64" : "32"; 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()) { } else if (isMac()) {
return String.format("lib%s-osx.jnilib", name); return String.format("lib%sjni-osx.jnilib", name);
} }
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }