Skip to content

Instantly share code, notes, and snippets.

@paraseba
Created October 31, 2011 18:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paraseba/1328334 to your computer and use it in GitHub Desktop.
Save paraseba/1328334 to your computer and use it in GitHub Desktop.
Setup your environment for the Clojure hands-on training

##Install Java

Install any version of Java JDK >= 1.5 You can download Java using your system's package manager or going to http://www.oracle.com/technetwork/java/javase/downloads/index.html

##Install Leiningen

Leiningen will help us automating some common tasks like installing dependencies and running the REPL. The installation procedure changes if you are in a Unix like system or in Windows. If you have any problems, there is more information in Leiningen's page: https://github.com/technomancy/leiningen

###Linux/OSX/Cygwin

###Windows

##Create a test project

  • in a terminal, cd into a clean directory
  • Run: lein new test-project
  • cd test-project
  • edit the file project.clj with any text editor
  • change [org.clojure/clojure "1.2.1"] to [org.clojure/clojure "1.3.0"]
  • save and close the file
  • in the terminal run: "lein deps", it may take some time to download dependencies
  • run "lein repl", it should open a prompt "user=>"
  • that's it you have clojure and leiningen running

##Editors and IDEs

Most people use Emacs for Clojure development, but you don't need to (I don't). Many people also use Vim together with VimClojure plugin. Both Emacs and Vim have a steep learning curve, and I can't recommend you to learn them at the same time you're learning how to program in Clojure.

So, probably the best option to start is Eclipse IDE with counterclockwise plugin installed.

  • download "Eclipse IDE for Java Developers" from http://www.eclipse.org/downloads/
  • uncompress the archive and run Eclipse, the executable is inside the eclipse directory
  • go to Menu Help > Install new software…
  • Paste the following Counterclockwise url in the “Work with:” textbox: http://ccw.cgrand.net/updatesite/
  • Hit Enter (it may take some time to respond)
  • Select counterclockwise, verify the “Contact all update sites during …” chekbox is checked, click next, accept licence, etc., It will take a long time, maybe unresponsive, just let it work for several minutes. When done, it will offer to restart Eclipse, accept
  • Go to menu Window > Reset Perspective ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment