Tomcat8 doesn't detect JRE > 8 when the default-jre package isn't installed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tomcat8 (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Bionic |
Fix Released
|
Medium
|
Unassigned |
Bug Description
[Impact]
Tomcat won't start, unless default-
If openjdk-11-jre is installed, it won't be used, unless default-
[Test Case]
In a minimal install:
# apt install tomcat8 openjdk-
# 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/
do
if [ -d "${jvmdir}" ]
then
fi
done
done
}
# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
# defined in $DEFAULT)
JDK_DIRS=
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-
# /etc/init.d/tomcat8 start
* no JDK or JRE found - please set JAVA_HOME
This was fixed in Debian in 8.5.31-1
Changed in tomcat8 (Ubuntu): | |
status: | New → Fix Released |
Changed in tomcat8 (Ubuntu Bionic): | |
importance: | Undecided → Medium |
This looks reasonable but please could you fill in the SRU information as required by https:/ /wiki.ubuntu. com/StableRelea seUpdates# Procedure?