Updating to Java 1.7 for OpenDJ 2.6.0

You can update your OpenDJ 2.6.0 configuration to use Java 1.7 in a few easy steps, gaining the benefits of greater reliability and better performance in the process.

This assumes you’re running on a Linux server. In my case Red Hat/CentOS.

Here are the steps:

1. Update Java on the server.

yum install java-1.7.0-openjdk
yum install java-1.7.0-openjdk-devel

If Java 1.7 is already installed you’d do a “yum update”.

2. Edit $DSHOME/config/java.properties as the OpenDJ directory owner to make these changes:

default.java-home=/usr/lib/jvm/java
start-ds.java-args=-server -Xms2G -Xmx2G -Dcom.sun.management.rmxremote

The first makes the directory server’s JAVA_HOME point to the system’s default JDK, which after the update in #1 above should be Java 1.7.0. The second restates what I consider to be relatively reasonable resource limits and enables the hook needed to get JVM statistics locally via a tool like jconsole.

3. Update the server’s java properties by running dsjavaproperties as the OpenDJ directory owner:

./dsjavaproperties

4. Stop and then start the directory server as its owner:

$DSHOME/bin/stop-ds
$DSHOME/bin/start-ds
This entry was posted in Directory on by .

About phil

My name is Phil Lembo. In my day job I’m an enterprise IT architect for a leading distribution and services company. The rest of my time I try to maintain a semi-normal family life in the suburbs of Raleigh, NC. E-mail me at philipATlembobrothersDOTcom. The opinions expressed here are entirely my own and not those of my employers, past, present or future (except where I quote others, who will need to accept responsibility for their own rants).