Showing posts with label CentOS. Show all posts
Showing posts with label CentOS. Show all posts

Friday, December 6, 2013

Registering Oracle Java using alternatives on CentOS 6

If you want to add the Oracle JDK to a CentOS 6 box, one easy way is to download the JDK RPM package, and use the rpm(8) command to install it easily, like this:

$ sudo rpm -ivh jdk-7u45-linux-i586.rpm

But chances are the newly installed JDK will not be visible at the command line, especially if the openjdk is already present. How to fix this? You'll have to use the alternatives(8) command to manually register the Oracle JDK. See the instructions on the if-not-true-then-false site for details. I recommend following the "Use Java JDK latest version" example.

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!)

Thursday, September 3, 2009

What's Going on with CentOS?

Realizing that it's been a while since there's been a CentOS release beyond 5.3, I popped over to the centos.org website and was surprised to read that there have been some project management changes in the wind.

You might want to check it out, too.