simple tool for compiling Clojure .clj into .class / .jar

后端 未结 2 1653
孤街浪徒
孤街浪徒 2021-01-19 18:52

I\'ve found two ways of compiling Clojure *.clj files into *.class files, and while they both work, I have some gripes with both of them.

The first one uses a REPL a

相关标签:
2条回答
  • 2021-01-19 18:55

    clojure.core/compile can be automated via Clojure

    0 讨论(0)
  • 2021-01-19 19:18

    Clojure provides clojure.core.Compile, which can be used to compile Clojure code from the command-line.

    java -Dclojure.compile.path=<targetdir> -cp <targetdir>;clojure.jar <list of namespaces>

    For an example of how to use this from ant, look at the compile-clojure task in Clojure's own build.xml file.

    0 讨论(0)
提交回复
热议问题