Installing and running clojure and Leiningen on windows 8

I’ve played around a little with Clojure on several occasions before, but never really done anything serious with it. I’ve decided to give it another try now, and I was pleasantly surprised by how easy it has gotten to install it on windows 8.

Earlier, I’ve run it in different ways, such as through emacs, directly on a command line, and from within the Eclipse IDE. I tried to get Leiningen to work too, some time ago, but had some problems getting it to run, which I never got round to solving.

This time, I followed these simple steps to get Clojure running via Leiningen, from a powershell console:

  • Open a powershell window in administrator mode (this is important – you won’t be able to install Leiningen if you’re not in admin mode).
  • Downlolad the .bat- file for windows available directly from the main page at leiningen.org (new window). For simplicity, I chose to place this right under a new catalog at c:\lein\
  • Install leiningen directly from the command line:

    ./lein self-install

    That should download Leiningen, Clojure, and all the other stuff you need automatically.

  • Now you should be able to start the REPL and start coding via Leiningen using:

    lein repl

Advertisements

About kjartanl

Systems Developer working near Bergen, Norway.
This entry was posted in English, Science & tech, Tips and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s