3 ms·
Native libraries are typically packaged inside a jar so that everything works over the existing build and dependency management systems. For example, each thes
by sedro 2y ago
Native libraries are typically packaged inside a jar so that everything works over the existing build and dependency management systems.
For example, each these jars named "native-$os-$arch.jar" contain a .dll/.so/.dylib:
https://repo1.maven.org/maven2/com/aayushatharva/brotli4j/ https://repo1.maven.org/maven2/com/aayushatharva/brotli4j/
JNA will extract the appropriate native library (using os.name and os.arch system properties), save the library to a temp file, then load it.
- throwaway2037 2y ago> JNA will extract the appropriate native library ..., save the library to a temp file, then load it. JNA does this? FYI: JNA = Java Native Access project: https://github.com/java-native-access/jna https://github.com/java-native-access/jna
- sedro 2y agoIt does! Code is here https://github.com/java-native-access/jna/blob/40f0a1249b5ad03020b5a2b66f42b9546e6d4edf/src/com/sun/jna/NativeLibrary.java#L297-L308 https://github.com/java-native-access/jna/blob/40f0a1249b5ad...
- okr 2y agoExamples of JARs, that transport such libraries: snappy, sqlite...