Showing posts with label Groovy. Show all posts
Showing posts with label Groovy. Show all posts

Friday, September 4, 2009

Getting Sun Java and Groovy Working on CentOS 5.3

I had a devil of a time getting Sun Java, Groovy, and the GraphicsRenderer class working on CentOS 5.3. Furthermore, Google searches for tips on the Internet failed to turn up any directly relevant results.

Therefore, by research, trial and error, I came up with this simple method which WORKS:
  1. Download the Sun Java JDK RPM and install it.
  2. Download the unofficial Groovy binary RPM from Codehaus.org and install it.
  3. Download the GraphicsBuilder module from Codehaus, too.
  4. Unzip GraphicsBuilder in /tmp.
  5. export GROOVY_HOME=/usr/share/groovy
  6. Drop all the GraphicsBuilder jar files into $GROOVY_HOME/lib.
  7. Copy or move the GraphicsBuilder bin directory to $GROOVY_HOME.
  8. Add the following lines to your .bashrc:
# Java setup for CentOS

export GROOVY_HOME=/usr/share/groovy
export JAVA="sun"
export JPATH="/usr/java/default"
export JAVA_HOME="$JPATH"
export CLASSPATH="$JPATH/lib:/usr/share/groovy/lib"

*THEN* make sure you add /usr/java/default/bin BEFORE /usr/bin in the shell PATH!

NOW you can use groovy from a bash command prompt (at last!)