Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-1067

OPENDJ_JAVA_HOME variable is not used by the OpenDJ tools

    XMLWordPrintable

Details

    Description

      The OPENDJ_JAVA_HOME value is correctly used by the setup tool but not by the bin/, bat/ tools.

      1. JVM Configuration
      I have 2 JVM installed:

      • /usr/lib/jvm/jdk1.6.0_45
      • /usr/lib/jvm/jdk1.7.0_25
        /usr/bin/java -> /usr/lib/jvm/jdk1.7.0_25

      2. Set OPENDJ_JAVA_HOME
      $ export OPENDJ_JAVA_HOME=/usr/lib/jvm/jdk1.6.0_45

      3. Configure the instance and start the server at the end of the installation
      $ ./setup

      4. Check java version in the config/java.properties file
      $ cat config/java.properties | grep "^default.java"
      default.java-home=/usr/lib/jvm/jdk1.6.0_45/jre

      5. Check java version used by the server
      $ cat logs/errors | grep "JVM Information"
      [09/Jul/2013:12:08:16 +0200] category=RUNTIME_INFORMATION severity=NOTICE msgID=20381713 msg=JVM Information: 1.6.0_45-b06 by Sun Microsystems Inc., 64-bit architecture, 1847394304 bytes heap size

      => after the installation the server is running using JDK 1.6 as expected

      6. Restart the server
      $ ./bin/stop-ds -R

      7. Check java version used by the server
      $ cat logs/errors | grep "JVM Information"
      ...
      [09/Jul/2013:13:49:56 +0200] category=RUNTIME_INFORMATION severity=NOTICE msgID=20381713 msg=JVM Information: 1.7.0_25-b15 by Oracle Corporation, 64-bit architecture, 1847394304 bytes heap size

      => after restart the server is running using JDK 1.7
      => same problem with the other tools

      8. Unset OPENDJ_JAVA_HOME
      $ unset OPENDJ_JAVA_HOME

      9. Restart the server
      $ ./bin/stop-ds -R

      10. Check java version used by the server
      $ cat logs/errors | grep "JVM Information"
      ...
      [09/Jul/2013:13:57:10 +0200] category=RUNTIME_INFORMATION severity=NOTICE msgID=20381713 msg=JVM Information: 1.6.0_45-b06 by Sun Microsystems Inc., 64-bit architecture, 1847394304 bytes heap size

      => the server is running using JDK 1.6

      Attachments

        Activity

          People

            ludo Ludovic Poitou
            csovant Christophe Sovant
            Christophe Sovant Christophe Sovant
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: