Bug#981337: tomcat9: cannot set JAVA_HOME in /etc/default/tomcat9 when using systemd service unit

Giuseppe Sacco giuseppe at sguazz.it
Fri Jan 29 14:09:27 GMT 2021


Package: tomcat9
Version: 9.0.31-1~deb10u3
Severity: normal

Dear Maintainer,
on a debian stable new installation, changing the JAVA_HOME property in
/etc/default/tomcat9 does not work, i.e. the java used is the default one.
In order to set a non default JAVA_HOME I had to add the lines:

[Service}
Environment="JAVA_HOME=/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64"

in its override file, i.e. /etc/systemd/system/tomcat9.service.d/00_javahome.conf .

Thank you,
Giuseppe


-- System Information:
Debian Release: 10.7
  APT prefers stable
  APT policy: (500, 'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-13-amd64 (SMP w/4 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages tomcat9 depends on:
ii  lsb-base        10.2019051400
ii  systemd         241-7~deb10u5
ii  tomcat9-common  9.0.31-1~deb10u3
ii  ucf             3.0038+nmu1

Versions of packages tomcat9 recommends:
ii  libtcnative-1  1.2.21-1

Versions of packages tomcat9 suggests:
pn  tomcat9-admin     <none>
pn  tomcat9-docs      <none>
pn  tomcat9-examples  <none>
pn  tomcat9-user      <none>

-- no debconf information



More information about the pkg-java-maintainers mailing list