Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ Grab the [latest release][cljzip] of Clojure and put the jar in the `lib` direct
$ curl http://clojure.googlecode.com/files/clojure_20090320.zip > /tmp/clojure.zip
$ unzip /tmp/clojure.zip -d /tmp/
$ cp /tmp/clojure/clojure.jar lib/


Next, get [JLine][] to make Clojure's interactive mode nicer:

$ curl http://internode.dl.sourceforge.net/sourceforge/jline/jline-0.9.94.zip > /tmp/jline.zip
$ unzip /tmp/jline.zip -d /tmp/
$ cp /tmp/jline-0.9.94/jline-0.9.94.jar lib/jline.jar

Make the `clj` script executable and link to it from somewhere in your `$PATH`. (I use `~/bin` and have added it to my `$PATH` in my `~/.bash_profile`):

$ chmod u+x clj
Expand All @@ -53,14 +53,14 @@ The `clj` command can be used to open an interactive session:

$ clj
Clojure
user=>
user=>

or it can be used to run a script:

$ clj test.clj
$ clj test.clj
Hello, Clojure!

To add extra jar files to the Clojure's classpath on a project-by-prject basis, just create a `.clojure` file in the project's directory with the text to add to the classpath.
To add extra jar files to the Clojure's classpath on a project-by-prject basis, just create a `.clojure` file in the project's directory with the text to add to the classpath.

For example, in my `~/code/clojure/cafe` project directory, I can add the Grinder and Frother jars from the `~/code/clojure/cafe/lib` directory by putting their relative paths, separated by a colon, into a `.clojure` file:

Expand Down
6 changes: 3 additions & 3 deletions clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Mark Reid <http://mark.reid.name>
# CREATED: 2009-03-29
JAVA=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java
JAVA=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java
CLJ_DIR=$HOME/Library/Clojure/lib
CLOJURE=$CLJ_DIR/clojure.jar
CONTRIB=$CLJ_DIR/clojure-contrib.jar
Expand All @@ -17,9 +17,9 @@ then
CP=$CP:`cat .clojure`
fi

if [ -z "$1" ]; then
if [ -z "$1" ]; then
$JAVA -server -cp $CP \
jline.ConsoleRunner clojure.lang.Repl
jline.ConsoleRunner clojure.lang.Repl
else
scriptname=$1
$JAVA -server -cp $CP clojure.lang.Script $scriptname -- $*
Expand Down