02 July 2020

There are several ways to install clojure on Linux and macOS, but no Windows option. Anyway, clojure official site provide one option to compile it with maven.

  1. download maven from http://maven.apache.org/download.cgi
  2. unpack maven to some folder, such as C:\apache-maven-3.6.3\bin
  3. add to maven to PATH, by add one line in ~/.bash_profile:

    export PATH=$PATH:/cygdrive/c/apache-maven-3.6.3/bin
  4. clone clojure src and compile with maven:

    git clone https://github.com/clojure/clojure.git
    cd clojure
    mvn -Plocal -Dmaven.test.skip=true package
  5. Then start the REPL with the local jar:

    java -jar clojure.jar

Now, you are a happy clojurian!