https://bz.apache.org/bugzilla/show_bug.cgi?id=63551
Bug ID: 63551 Summary: Tomcat overrides default JAVA_HOME variable Product: Tomcat 8 Version: 8.5.39 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: apache....@marco.sulla.e4ward.com Target Milestone: ---- In /etc/init.d/tomcat8 there's this code: # this is a work-around until there is a suitable runtime replacement # for dpkg-architecture for arch:all packages # this function sets the variable JDK_DIRS find_jdks() { for java_version in 11 10 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 # Look for the right JVM to use for jdir in $JDK_DIRS; do if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then JAVA_HOME="$jdir" fi done export JAVA_HOME Can't be JAVA_HOME overwritten only if it does not exists or is empty or invalid? -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org