Internal only - Do not use this class. This class loads a native
library of snappy-java (snappyjava.dll, libsnappy.so, etc.) according to the
user platform (
os.name and
os.arch). The natively compiled
libraries bundled to snappy-java contain the codes of the original snappy and
JNI programs to access Snappy.
In default, no configuration is required to use snappy-java, but you can load
your own native library created by 'make native' command.
This SnappyLoader searches for native libraries (snappyjava.dll,
libsnappy.so, etc.) in the following order:
- If system property org.xerial.snappy.use.systemlib is set to true,
lookup folders specified by java.lib.path system property (This is the
default path that JVM searches for native libraries)
- (System property: org.xerial.snappy.lib.path)/(System property:
org.xerial.lib.name)
- One of the libraries embedded in snappy-java-(version).jar extracted into
(System property: java.io.tempdir). If
org.xerial.snappy.tempdir is set, use this folder instead of
java.io.tempdir.
If you do not want to use folder java.io.tempdir, set the System
property org.xerial.snappy.tempdir. For example, to use
/tmp/leo as a temporary folder to copy native libraries, use -D option
of JVM:
java -Dorg.xerial.snappy.tempdir="/tmp/leo" ...