SWITCHING JDK FOR GLASSFISH APPLICATION SERVER

Since the latest Imixs Workflow release 2.1.0 we recommend to run Imixs Workflow Applications on Glassfish Application Server using JDK 1.6.

If you use Linux Debian as your Server platform – which is a nice choice – the upgrade from JDK 1.5 to JDK 1.6 is a little bit tricky. So make sure to pay attention to the following points:

  1. Java 1.6 for debian 4 (etch) is available in backports, so just add backports.org to sources.list:
      >vi /etc/apt/sources.list
    and add the following line to the list of repositories:
    deb http://www.backports.org/debian etch-backports main contrib non-free
  2. Next you can install the JDK 1.6 with following command
    >aptitude update
    >aptitude -t etch-backports install sun-java6-jdk
  3. Now you be able to switch to the new java version using the following command:
    >update-alternatives –config java
    You will see an output like this:
 There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                      Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-6-sun/jre/bin/java       63        auto mode
  1            /usr/lib/jvm/java-1.5.0-sun/jre/bin/java   53        manual mode
* 2            /usr/lib/jvm/java-6-sun/jre/bin/java       63        manual mode

Press enter to keep the current choice[*], or type selection number:

now you can choose the new JDK.
After you have upgraded the Java Version you can check the version number with

 >java -version

You should now see something like this:

java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)

UPDATE THE GLASSFISH ENVIRONMENT

After you have changed the JDK on your OS you need to change also the JDK setting used by the Glassfish Server.

The JDK which is used to start the Glassfish Server is configured in the file

GLASSFISH_INSTALL/config/asenv.conf

Edit the file with

>vi asenv.conf

and change the line

AS_JAVA="/usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/.."

into

AS_JAVA="/usr/lib/jvm/java-6-sun/jre/.."

Now you can restart Glassfish Server which will now run with the new JDK 1.6.

Leave a Reply

Your email address will not be published. Required fields are marked *