Clojure Tutorial: Run/Execute One Clojure File

By Xah Lee. Date: . Last updated: .

How to run a single Clojure file?

Run a single Clojure file like this:

java -cp clojure.jar clojure.main ‹filename›
;; save this in a file named x.clj, and you can run it by
;; java -cp clojure.jar clojure.main x.clj
(println (+ 3 4))

Reference

http://clojure.org/repl_and_main