How can I run a .clj Clojure file I created?

前端 未结 8 1854
夕颜
夕颜 2021-01-30 08:19

I\'ve installed Geany on my Linux Mint machine and I wrote some simple code. Just a small hello world to get started with the language.

Now I\'d like to run it and see w

8条回答
  •  不要未来只要你来
    2021-01-30 09:00

    For a single clj file you can add,

    #!/usr/bin/env java -cp /path/to/clojure-1.2.0.jar clojure.main
    

    to the top of the file and make it executable or you can use leiningen which is a clojure build tool it will create a single jar that has everything packed, then you can just do,

    java -jar cool_app.jar
    

提交回复
热议问题