Skip navigation

If emacs isn’t your thing, or you prefer a modern IDE (read: GUI) for development, I recommend IntelliJ IDEA.  An open-source, community edition was just released, and it is definitely worth giving a spin – I’ve been a fan since I first tried it a couple of years ago.

Being at a university where the first language taught is Java, but transferring from an institution where C++ was dominant was a bit of a pain.  IntelliJ got me through my Java-based courses.  I tried and managed with Eclipse and NetBeans for the first semester – but we were given a significant initial framework.

Enough of my praise for IntelliJ.  Let’s get started!

  • 2. Install IntelliJ
  • 3. Let IntelliJ know where the JDK is (Linux only)

Assuming that a JDK is already installed, run
updatedb; locate jdk | grep jre$
Do something like the following based on those results
echo "export JDK_HOME=\"/usr/lib/jvm/java-6-openjdk\"" >> ~/.bashrc

  • 4. Install ‘La Clojure’ Plugin

Run IntelliJ (linux:bin/idea.sh), open the plugin manager, and search for ‘la clojure’.   Select it for installation, and click OK.

  • 5. Create a Clojure Project

Click ‘Create New Project’, select ‘Create project from scratch’, give it a descriptive name, and select ‘Clojure’ as a desired technology.

  • Start a REPL!

Tools -> Start Clojure Console

About these ads

9 Comments

  1. Great help, thank you.

  2. hi,
    thanks for this post.. i followed all the steps, and in a new project i am able to do tools > start clojure console..
    but there is no “clojure REPL actions” .. there is “clojure REPL” but it doesn’t have “add new clojure REPL under it. just 4 grayed out options.. load run execute run..

  3. Yeah, the options have slightly changed.

    Tools -> Clojure REPL Actions -> Add new Clojure REPL
    has been changed to
    Tools -> Start Clojure Console

    The 4 options in ‘Tools -> Clojure REPL’ only work when a clojure file is opened.

  4. thanks!
    so.. why do we need the clojure console running? i thought the point was to code in IDE with some sort of intelisense support?

  5. There are a variety of benefits of having the IDE, and I don’t know what is most important to you.

    Regardless of environment, a large benefit of programming in Clojure is the REPL – you can get instant feedback on your code. I frequently build and test small parts of a function in the REPL, before putting everything together in a file.

    You might consider using options from ‘Tools -> Clojure REPL’ instead of typing everything in the REPL directly and copying it out as I frequently do, but the point is getting instant feedback on the code you are writing right now.

  6. yes, but clojure REPL can be easily set up using just terminal .. http://mark.reid.name/sap/setting-up-clojure.html
    why bother with intelliJ if that’s all you need?

  7. There are a variety of benefits of having the IDE, and I don’t know what is most important to you.

  8. Is there any way to run clojure tests inside IDEA and see the red/green/orange bar?

    • I don’t know off the top of my head, and I don’t have the ability to run IDEA for the next few weeks.


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

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: