The tomcat9.service doesn't use JAVA_HOME defined in /etc/default/tomcat9
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tomcat9 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
When I define JAVA_HOME in /etc/default/
I have 2 JDKs installed
openjdk-11-jdk
openjdk-14-jdk
The /etc/default/
JAVA_HOME=
JAVA_OPTS=
After the tomcat9 service restart, the Java version used is still 14:
java.specificat
== Workaround
It started to work with Java 11 when I added following line to the service file (/usr/lib/
EnvironmentFile
It was followed by:
sudo systemctl daemon-reload
sudo systemctl restart tomcat9.service
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: tomcat9 9.0.31-1 [modified: lib/systemd/
ProcVersionSign
Uname: Linux 5.4.0-31-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: MATE
Date: Tue May 26 14:22:05 2020
InstallationDate: Installed on 2020-04-30 (25 days ago)
InstallationMedia: Ubuntu-MATE 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
PackageArchitec
SourcePackage: tomcat9
UpgradeStatus: No upgrade log present (probably fresh install)
modified.
modified.
modified.
modified.
modified.
modified.
mtime.conffile.
Status changed to 'Confirmed' because the bug affects multiple users.