On Clojure (part 6)

Sun Nov 30 2008
clojure lisp aot ant lancet java

AOT problem solved

Thanks to the swift responses of the Clojure google group I have got past my little problem. It was, of course, deceptively simple, but not clear to someone who doesn’t do Java programming much.

The problem was basically that whatever I did I could not get Clojure to recognise that the source files existed in the classpath.

When you invoke java with the -jar command line option it completely ignores the classpath (both the environment variable, or the -cp argument.

So, when compiling my code I simply switch this:

    java -cp ./classes:./src -jar ${HOME}/src/clojure/clojure.jar ./compile.clj

.. to this …

    java -cp ./classes:./src:${HOME}/src/clojure/clojure/jar clojure.lang.Script ./compile.clj

For the record the contents of compile.clj are as follows:

    (binding [*compile-path* "/home/gteale/src/aot_test/classes"]
             (compile 'de.teale.test))

I plan to replace that with either ant or lancet shortly.

HTML5 and all that

Sun Jan 10 2010
frontend html clojure xml flash google_gears emacs nxml

On Clojure (part 7)

Tue Jan 13 2009
clojure lisp apple macosx core_data nicole

On Clojure (part 5)

Sun Nov 30 2008
clojure lisp aot recursion