Closed jirutka closed 7 years ago
@jpountz Could you please look at this PR?
Would this be dangerous if the api used by the JNI hooks changed?
Why dangerous? You just need to have correct (ABI compatible) version of the native lib. It’s the same as with any other dynamically linked library.
Merged.
Ideally, lz4-java should include every architecture's native library, but practically it is impossible, so I think it makes sense to have this feature.
Can you elaborate how to give path to liblz4-java . when I am running jar
Place your liblz4-java.so to a directory. Suppose it is /path/to/your/library/directory
. Then run java -Djava.library.path=/path/to/your/library/directory ...
.
Use system-provided lz4-java, if it's available on the
java.library.path
(the default location where Java looks for native libraries), and fallback to bundled binary if it's not. This allows user to use lz4 java even on systems that are not directly supported, like Linux with musl libc, uClibc etc.