I am experimenting with clojure and trying to figure out how to use third-party libraries. I was able to load some source, link it in a jar file with leiningen, put it in my classpath and (use 'lib.etc) in my script. I also played with objects in java.lang. *.
I had no success with third-party java, however.
$ java -cp clojure.jar:clojure-contrib.jar:com.jcraft.jsch_0.1.31.jar clojure.main Clojure 1.1.0 user=> (require 'com.jcraft.jsch) java.io.FileNotFoundException: Could not locate com/jcraft/jsch__init.class or com/jcraft/jsch.clj on classpath: (NO_SOURCE_FILE:0) $ jar tf com.jcraft.jsch_0.1.31.jar | egrep "(init|clj)" $
It looks like the __init.class or .clj file should be created. Is this true or is there an alternative way that pure Java classes should be loaded?
java libraries clojure jsch
Doug f
source share