Introduction
Here is a short tutorial on setting up an Eclipse + Clojure + Counterclockwise + Leiningen development environment. Most of which was learnt from Chad Emerick’s excellent Starting Clojure screencast.
Eclipse
Download and install the latest version of Eclipse Classic
Leiningen
Download the latest Leiningen script and add it to your system path. I have a ~/bin/ directory for user scripts.
To add ~/bin/ to your path just:
OSX: echo 'export PATH=~/bin:$PATH' >> ~/.profile
Linux: export PATH=~/bin:$PATH
Then make lein executable..
chmod 777 ~/bin/lein
Run the lein command. It will automatically download the dependencies and install itself.
Eclipse Counterclockwise Plugin
Help -> Install New Software -> Add
http://ccw.cgrand.net/updatesite/
Eclipse Leiningen Plugin
Help -> Install New Software -> Add
http://ccw.cgrand.net/updatesite-lein-betas
Usage
Start a new project with leiningen lein new foo
Open that Project as a “normal” project (NOT Clojure project) in Eclipse.
Right click on that project -> Configure -> Convert to Leiningen Project -> Enable Clojure support -> Run as -> Clojure Application
The REPL should now launch and automatically load whatever Clojure file you were working in.
Recent Comments