Yeah, just realised I forgot that, too.

** Description changed:

+ [Impact]
+ Tomcat won't start, unless default-jre-headless or openjdk-8-jre-headless is 
installed.
+ 
+ If openjdk-11-jre is installed, it won't be used, unless default-jre-
+ headless is installed.
+ 
+ [Test Case]
+ In a minimal install:
+ 
+ # apt install tomcat8 openjdk-11-jre-headless
+ # service tomcat8 start
+ 
+ If you get this error, you have reproduced the bug:
+  * no JDK or JRE found - please set JAVA_HOME
+ 
+ If it starts, all is good
+ 
+ [Regression Potential]
+ For some users, tomcat may now use Java 11 where it was previously using Java 
8.
+ 
+ [Bug Description]
  The tomcat8 init script contains:
  
  find_jdks()
  {
-     for java_version in 9 8
-     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-* \
-                       /usr/lib/jvm/java-${java_version}-oracle
-         do
-             if [ -d "${jvmdir}" ]
-             then
-                 JDK_DIRS="${JDK_DIRS} ${jvmdir}"
-             fi
-         done
-     done
+     for java_version in 9 8
+     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-* \
+                       /usr/lib/jvm/java-${java_version}-oracle
+         do
+             if [ -d "${jvmdir}" ]
+             then
+                 JDK_DIRS="${JDK_DIRS} ${jvmdir}"
+             fi
+         done
+     done
  }
  
  # 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
  
  When the default-jre package is installed, this detects Java 11, but
  when it isn't, it doesn't.
  
  # apt install tomcat8 openjdk-11-jre-headless
  # /etc/init.d/tomcat8 start
-  * no JDK or JRE found - please set JAVA_HOME
+  * no JDK or JRE found - please set JAVA_HOME
  
  This was fixed in Debian in 8.5.31-1

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1780345

Title:
  Tomcat8 doesn't detect JRE > 8 when the default-jre package isn't
  installed

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tomcat8/+bug/1780345/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to