Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Get Clojure and emacs live running in Windows

Posts: 1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greetings to you all.

My name is Carl and I'm a 20 year-old novice learning Clojure, Python and Java. I have Clojure running on a virtual Linux Distro, but I like having the flexibility of running it on Windows as well.

This guide will help you set up Clojure on Windows 7 with leinigen and emacs live.
Note : All the steps below apply to Windows 7 64 bit. If anyone has experience setting this up on other Windows operating systems, feel free to include some extra details in the reply posts.

1)First things first, you need java to be able to run Clojure, so make sure you have the latest build installed.
Get it from here:

2)You will need the self-contained version of Wget which is (in essence) a non-interactive download utility:

I'm not a huge fan of the Windows terminal because of it's limited horizontal resizability, so I like to use console2 which is quite neater.
Get it free from here:

3)Now you will need leiningen, which allows you to manage your Clojure projects:
Get it directly from here :

(or you can manually go to the github leiningen site, and scroll down to windows and right-click and save the batch file)

4)Next you will need emacs live which has some incredible features for Clojure, so head over to

and download the latest version of emacs. (should be 24.3 as of December 2013)

Then download the zip file of emacs live from here:

Now you should have the following list of files: (or greater)

I would suggest going to the administrative user directory and create a \local\bin there. For example:


Extract all of the zip files you downloaded. This may take a while.

Cut and paste the lein.bat and the wget.exe into your \bin folder.

Cut and paste your emacs-24.1 folder and your console2 folder into your \local folder.

5)Now you need to set up your path variables:

You can either click on your profile picture in the start menu and click on "Change my environment variables".

go to your Control Panel
Open the System icon
Open the Advanced system settings
Path Environment Variables

If you're on a fresh installation of Windows 7, or you simply don't have the PATH variable, then
click on "New"
In the variable name, call it PATH
In the variable value, copy and paste the directory of your java\jre7\bin folder (or whatever version of java you're using) and add the following :


I just copied and pasted mine for simplicity but if you have a later version of emacs make sure to make the right adjustements.

The variable value should look something like this:

C:\Program Files (x86)\Java\jre7\bin;%USERPROFILE%\local\bin;%USERPROFILE%\local\Console2;%USERPROFILE%\local\emacs-24.3\bin

6)Open console2 and go to your administrative user directory. (you can make this the default directory by opening edit -> settings and changing your start directory to C:\Users\Carl for example)

Type in java, if the console doesn't complain that it can't find java then your PATH is set up correctly.
Type in lein self-install : using wget, it will connect to github automatically and download the leiningen jar. This may take a while.

7)Go to your start menu and type runemacs and open it, then close it. (this is to create a .emacs.d folder in your roaming directory)

8)Copy your emacs-live-master folder

In the Start Menu type in %APPDATA%, click on roaming and paste your emacs-live-master folder here. Once it's done copying, rename it to .emacs.d

9)Head back to the console and type in lein, it should download some additional files. Once that is finished, leinigen is now properly set up.

Type in lein again, and it should run it.

Then you can create a new project by going to whichever directory you want by typing in (for example):

mkdir Projects

cd Projects

lein new cljtest

cd cljtest

10)Open runemacs again and it should load emacs live. Holding the ctrl key, hit x then f to find a file. And go to the directory where you created your project. For example:


and type in project.clj and hit enter.

11)In order to open an nREPL server, simply hold the alt key and hit x, then type in nrepl-jack-in and hit enter. This might take a while.

Congratulations! You are now successfuly running clojure in Windows.

Note: The default mode is paredit and it might take some time to get use to it. There are numerous guides out there helping you to learn paredit features.

[Thumbnail for 1.jpg]
[Thumbnail for 3.png]
author & internet detective
Posts: 40795
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for posting this. You said the default mode is paredit. I hadn't realized the default mode for emacs had a name; that was good to learn.
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, thanks for the tutorial.

First, after I run emacs, I won't find any .emacs.d folder inside roaming folder

also I'm gettin this error:

when I type in

how can I solve these? (win 8.1 x64)

You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic