Create and move to the directory where you want to install Java and Clojure. For example, in your
$HOME directory, type the following at the command line :
Download the appropriate version of the JDK 1.7 into the
Extract the tarball file. At the command line type:
tar xzf jdk-7u5-linux-x64.tar.gz
Download the following JAR files into the
.bashrc file. At the command line type:
Go to very end of the file and add the following lines:
alias clj='java jline.ConsoleRunner clojure.main'
Save the file.
Make sure your terminal window runs as a login shell. In the terminal's main menu select
Edit/Profile Preferences. Select the
Title and Command tab, and tick the "Run command as login shell" check-box.
Close all open terminal windows and open a new one. Verify that Clojure was installed correctly. Type at the command line:
You should see the Clojure REPL (Read Eval Print Loop):
Type Ctrl-D to exit the REPL.
- If you use jEdit as your Clojure editor, you can use Daniel Spiewak's Clojure mode file. Just copy the
clojure.xml file into jEdit's