Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

example clojure startup script for mac osx

phraemer edited this page Sep 13, 2010 · 1 revision

Here’s my bash script to start clojure with processing adapted from the one here

I’ve also got jline there and i place this script in the same dir as the clj-processing jar file.


#!/bin/bash 
CLOJURE_DIR=~/dir-where-i-have-clojure
CLOJURE_JAR=$CLOJURE_DIR/clojure-1.0.0.jar
CONTRIB_JAR=$CLOJURE_DIR/clojure-contrib/clojure-contrib.jar
JLINE_JAR=$CLOJURE_DIR/jline-0.9.94.jar
PROCESSING_DIR=/Applications/Processing.app/Contents/Resources/Java
PROCESSING_OGL=$PROCESSING_DIR/libraries/opengl/library
PROCESSING_JAR=$PROCESSING_DIR/core.jar:$PROCESSING_OGL/gluegen-rt.jar:$PROCESSING_OGL/jogl.jar:$PROCESSING_OGL/opengl.jar:rosado.processing.jar

if [ -z "$1" ]; then
    java -cp $JLINE_JAR:$CLOJURE_JAR:$CONTRIB_JAR:$PROCESSING_JAR -Djava.library.path=$PROCESSING_OGL jline.ConsoleRunner clojure.lang.Repl
else
    java -cp $CLOJURE_JAR:$CONTRIB_JAR:$PROCESSING_JAR -Djava.library.path=$PROCESSING_OGL clojure.lang.Script $1 -- $*
fi


Clone this wiki locally