Skip to content

Clojure setup HOWTO

Nikola Plejić edited this page Feb 20, 2015 · 2 revisions

Java & JDK

You'll need Java version 1.7 for your operating system of choice. OpenJDK from Ubuntu/Debian repositories will do.

Leiningen

Leiningen is the de facto standard build & dependency management tool for Clojure. It is also the only tool you'll need to install to get Clojure up & running. The Leiningen website has installation instructions.

To verify everything works, type lein repl in the command line (or lein.bat repl if on Windows), and you should get something along the lines of this:

nREPL server started on port 59559 on host 127.0.0.1 - nrepl://127.0.0.1:59559
REPL-y 0.3.5, nREPL 0.2.6
Clojure 1.6.0
OpenJDK 64-Bit Server VM 1.7.0_65-b32
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

user=>

Hit CTRL+D to exit.

Editors

Your editor of choice probably has some support for Clojure: Vim, Emacs, Sublime Text, and Eclipse all have it built-in or available as an add-on.

If you don't want to pollute your standard dev environment, or simply want a more suitable editor, Light Table might be a decent choice.

Clone this wiki locally