#1057047 tomcat10-common: Tomcat 10 helper script doesn't look for temurin based jdk installs

#1057047#5
Date:
2023-11-28 16:59:18 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?
I am trying to use debian's tomcat 10 with java 21, since it's not present on debian I used the one from
https://adoptium.net/installation/linux/ that has a repository.
When starting tomcat I see this error message on the logs:
  " [crit] No JDK or JRE found - Please set the JAVA_HOME variable or install the default-jdk package"
I traced the message to the helper script /usr/libexec/tomcat10/tomcat-locate-java.sh, there adding the
 temurin naming scheme made the helper found the proper java

from:.....
            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 \
                          /usr/lib/jvm/oracle-java${java_version}-jdk-* \
                          /usr/lib/jvm/oracle-java${java_version}-jre-*
            do

to:.......
            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 \
                          /usr/lib/jvm/oracle-java${java_version}-jdk-* \
                          /usr/lib/jvm/oracle-java${java_version}-jre-* \
                          /usr/lib/jvm/temurin-${java_version}-jre-* \
                          /usr/lib/jvm/temurin-${java_version}-jdk-*
            do


Since currently the temurin path is quite a popular way to install recent jdk/jre version without
having to rely on oracle, supporting it on debian would be nice and without collateral issues

#1057047#10
Date:
2023-12-03 15:09:54 UTC
From:
To:
debian I used the one from

[...]

Hello,

we support only OpenJDK and there is even openjdk-21-jre in unstable. For
stable releases only one version of openjdk is supported in general, currently
OpenJDK 17.