On Jul 12, 2009, at 7:28 AM, Morgan Allen wrote:
Thanks for the info- it works just fine now. A couple of questions, though: 1- How would I change the 'classes' directory to something else?
There are at least two ways:You can specify it as a property on the command line you use to launch java:
% mkdir comp% java -cp src:comp:<path-to>/clojure.jar -Dclojure.compile.path=comp clojure.main
Clojure 1.1.0-alpha-SNAPSHOT user=> (compile 'sov.sim.character) sov.sim.character user=> You can bind the Clojure var *compile-path* within Clojure: % java -cp src:comp:<path-to>/clojure.jar clojure.main Clojure 1.1.0-alpha-SNAPSHOT user=> (binding [*compile-path* "comp"] (compile 'sov.sim.character)) sov.sim.character user=>Note that no matter how you specify it, it must be in classpath and it must exist at the JVM used by Clojure is launched.
2- Can I still use/require other files that haven't been compiled ahead of time?
Absolutely. Note that you're compiling a namespace, not a file. Any namespaces you use or require while defining your namespace will also be compiled if they have not already been compiled or if their source file is newer than their class files.
--Steve
smime.p7s
Description: S/MIME cryptographic signature