Compiling Clojure?

前端 未结 3 1010
抹茶落季
抹茶落季 2020-12-29 08:07

I\'m feeling slightly silly here, but I can\'t get Clojure Hello World to compile.

Directory structure:

hello-world/
  clojure-1.1.0.jar
  build/
            


        
相关标签:
3条回答
  • 2020-12-29 08:11

    To run clojure file

    clojure filename.clj
    
    0 讨论(0)
  • 2020-12-29 08:14

    Why you don't use Leiningen? It's much easier to use it, than compile code manually. You can use my article about it as introduction...

    0 讨论(0)
  • 2020-12-29 08:33

    Got it, there's a fourth requirement:

    • *compile-path* is resolved relative to the JVMs working directory, normally the directory where java is started. Or by REPL: (System/getProperty "user.dir"),

    So this works:

    user=> (set! *compile-path* "build/classes")     
    "build/classes"
    user=> (compile 'test.hello)
    test.hello
    
    0 讨论(0)
提交回复
热议问题