Msd, something like this
java -Djava.library.path=/usr/local/lib -cp clojure-1.2.0.jar:src clojure.main or in lein add :native-path "/usr/local/lib:/usr/lib" to your project def then you should be able to make the JNI/JNA calls On Dec 31, 12:39 pm, ax2groin <ax2gr...@gmail.com> wrote: > I'm having trouble formulating a method to load JNI libraries into > System. I'm just getting started, so this is a newbie question. > > I want something like this: > > (defn get-jni-path > "Derive the path to DLLs from environmental variables" > [] > (let [path (System/getenv "APP_CONFIG_DIR")] > (str (.substring path 0 (- (.length path) (.length "Config"))) > "bin/"))) > > (defn load-jni > "Load the required libraries into the System so that the JNI works." > [] > (let [paths (map #(str (get-jni-path) %) ["coms.dll", "sqlite.dll", > "utils.dll", "zlib.dll"])] > (doto System > (load paths)))) > > But obviously I cannot handle the "paths" like this. I'm sure it's a > simple answer, but I'm missing it. > > Thanx, > msd -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en