The answer depends on your specific use case. In the simplest situation, you need to:
- lib jar, ,
project.clj native/ :resource-paths. - ,
:native-prefix, , . , "mylib.so" , : [com.foo/bar "1.0.1" :native-prefix ""] - , ,
:native-path project.clj. - ,
:native-path, java.library.path, :jvm-opts, .
sample leiningen project.clj.
, , , , uberjar, , . , lib, . , loadLibraryFromJar NativeUtils. , , ClassLoader , System/load. , , JVM, System/loadLibrary . :
- lib uberjar ,
(-> my-lib io/resource io/input-stream (io/copy my-temp-file)) java.library.path , , System/setProperty- , , .
, .