Processing on Linux with system JDK

I noticed Processing - an environment for making cool visualizations - a while ago and now I have finally decided to give it a try. One little annoyance happened after downloading the archive ... I noticed that Linux version includes a whole JDK bundled in it ... not just JRE, but the whole thing. Apparently it is needed. Since I already have a JDK installed and I hate unnecessary redundancy and duplication, I have decided to make it use my system JDK.

Below you can see my modified processing boot script.

#!bash
#!/bin/bash

JAVADIR="/usr/lib/jvm/java-6-sun"

APPDIR="$(dirname -- "${0}")"
cd ${APPDIR}
CLASSPATH="${CLASSPATH}:${JAVADIR}/jre/lib/rt.jar:${JAVADIR}/lib/tools.jar"

for LIB in lib/*.jar ;
do
    CLASSPATH="${CLASSPATH}:${LIB}"
done
export CLASSPATH

export PATH="${JAVADIR}/bin:${PATH}"

java processing.app.Base
Written on July 25, 2009 at 10:57 a.m.
blog comments powered by Disqus