Getting Started

Getting Started

Minimal Install

Clojure requires only Java 1.6 or greater, plus the Clojure JAR file itself.

Download and unzip Clojure. In the directory in which you expanded, run:

java -cp clojure-1.8.0.jar clojure.main

This will bring up a read-eval-print loop (REPL). From the REPL, try:

user=> (+ 1 2 3)
user=> (javax.swing.JOptionPane/showMessageDialog nil "Hello World")

Try Clojure Online

  • TryClojure provides a browser-based Clojure REPL

  • Himera provides a browser-based ClojureScript REPL

Clojure with Leiningen

Leiningen is a build and project management tool written in Clojure and used pervasively throughout the Clojure community. Follow the instructions there to install Leiningen.

Once it’s installed you can start a REPL with:

lein repl

Check out the Resources page for tutorials and other great resources!

Original author: Rich Hickey