Bug#756310: jetty8: Update the JDKs allowed at runtime

Emmanuel Bourg ebourg at apache.org
Mon Jul 28 15:49:52 UTC 2014


Package: jetty8
Version: 8.1.3-9
Severity: normal
User: debian-java at lists.debian.org
Usertags: openjdk-8-transition

The init script of jetty8 looks for a JDK at the following locations:

  /usr/lib/jvm/default-java
  /usr/lib/jvm/java-6-sun
  /usr/lib/jvm/java-6-openjdk
  /usr/lib/jvm/java-1.5.0-sun
  /usr/lib/jvm/java-gcj
  /usr/lib/j2sdk1.6-sun
  /usr/lib/j2sdk1.5-sun
  /usr/lib/j2sdk1.5-ibm
  /usr/lib/j2sdk1.4-sun
  /usr/lib/j2sdk1.4
  /usr/lib/j2se/1.4
  /usr/lib/kaffe/

This list should updated to:
- remove the old JDKs (Jetty 8 requires Java 6 or later)
- support the Oracle JDK packages created by java-package (such as
/usr/lib/jvm/jdk-7-oracle-x64)
- support OpenJDK 7, 8 and later

For example the tomcat7 package uses the following logic to locate the JDK:

http://sources.debian.net/src/tomcat7/7.0.54-2/debian/tomcat7.init

  find_jdks()
  {
      for java_version in 9 8 7 6
      do
          for jvmdir in /usr/lib/jvm/java-${java_version}-openjdk-* \
                        /usr/lib/jvm/jdk-${java_version}-oracle-* \
                        /usr/lib/jvm/jre-${java_version}-oracle-*
          do
              if [ -d "${jvmdir}" -a "${jvmdir}" !=
"/usr/lib/jvm/java-${java_version}-openjdk-common" ]
              then
                  JDK_DIRS="${JDK_DIRS} ${jvmdir}"
              fi
          done
      done

      # Add older non multi arch installations
      JDK_DIRS="${JDK_DIRS} /usr/lib/jvm/java-6-openjdk
/usr/lib/jvm/java-6-sun /usr/lib/jvm/java-7-oracle"
  }

  # The first existing directory is used for JAVA_HOME
  # (if JAVA_HOME is not defined in $DEFAULT)
  JDK_DIRS="/usr/lib/jvm/default-java"
  find_jdks



More information about the pkg-java-maintainers mailing list