java - Linker error on Clojure REPL but not on compiled jar when using a JNI library -


i have jni library, both .jar , .so files. note library intended java, not clojure. right i've been able run code using library in java, on eclipse.

what i'm trying getting library run on clojure means of java interop capabilities. i've been successful in doing creating jar file, it's not working on repl.

here's i've done far:

  • first, i've set leiningen project , imported jar jni bindings import , see classes library expected.

  • then, added native library ld_library_path (that's necessary library run in java), , loading seems fine (no errors) on repl.

at point, when trying use constructor (or function, matter) library, linker errors:

unsatisfiedlinkerror edu.upc.freeling.freelingjni.new_tokenizer(ljava/lang/string;)j  edu.upc.freeling.freelingjni.new_tokenizer (freelingjni.java:-2) 

note that same line runs both on java , in clojure jar generated "lein uberjar".

i'm still quite new clojure , don't know possibly wrong, seeing how jar version running fine.

any clues?

the problem leiningen load library has exist on online repository or local repository. you'll have create local repository jar using maven , declare :repository option in project.clj file. paul gross has detailed tutorial on how on blog.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -