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

后端 未结 2 1652
孤街浪徒
孤街浪徒 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 19:18

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

    java -Dclojure.compile.path= -cp ;clojure.jar

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

提交回复
热议问题