Fix commend on loading libsnappyjava
This commit is contained in:
parent
3710c4e7dc
commit
fe85390989
|
@ -54,13 +54,15 @@ import java.util.Properties;
|
||||||
* This SnappyLoader searches for native libraries (snappyjava.dll,
|
* This SnappyLoader searches for native libraries (snappyjava.dll,
|
||||||
* libsnappy.so, etc.) in the following order:
|
* libsnappy.so, etc.) in the following order:
|
||||||
* <ol>
|
* <ol>
|
||||||
|
* <li>If system property <i>org.xerial.snappy.use.systemlib</i> is set to true,
|
||||||
|
* lookup folders specified by <i>java.lib.path</i> system property (This is the
|
||||||
|
* default path that JVM searches for native libraries)
|
||||||
* <li>(System property: <i>org.xerial.snappy.lib.path</i>)/(System property:
|
* <li>(System property: <i>org.xerial.snappy.lib.path</i>)/(System property:
|
||||||
* <i>org.xerial.lib.name</i>)
|
* <i>org.xerial.lib.name</i>)
|
||||||
* <li>One of the libraries embedded in snappy-java-(version).jar extracted into
|
* <li>One of the libraries embedded in snappy-java-(version).jar extracted into
|
||||||
* (System property: <i>java.io.tempdir</i> or if
|
* (System property: <i>java.io.tempdir</i>). If
|
||||||
* <i>org.xerial.snappy.tempdir</i> is set, use this folder.)
|
* <i>org.xerial.snappy.tempdir</i> is set, use this folder instead of
|
||||||
* <li>Folders specified by java.lib.path system property (This is the default
|
* <i>java.io.tempdir</i>.
|
||||||
* path that JVM searches for native libraries)
|
|
||||||
* </ol>
|
* </ol>
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -132,10 +134,9 @@ public class SnappyLoader
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load SnappyNative and its JNI native implementation in the root class
|
* Load SnappyNative and its JNI native implementation using the root class
|
||||||
* loader. This process is necessary to avoid the JNI multi-loading issue
|
* loader. This hack is for avoiding the JNI multi-loading issue when the
|
||||||
* when the same JNI library is loaded by different class loaders in the
|
* same JNI library is loaded by different class loaders.
|
||||||
* same JVM.
|
|
||||||
*
|
*
|
||||||
* In order to load native code in the root class loader, this method first
|
* In order to load native code in the root class loader, this method first
|
||||||
* inject SnappyNativeLoader class into the root class loader, because
|
* inject SnappyNativeLoader class into the root class loader, because
|
||||||
|
|
Loading…
Reference in New Issue