Bug 57461

Summary: Rename 'JAVA_HOME' message printed by VersionLoggerListener
Product: Tomcat 8 Reporter: Konstantin Kolinko <knst.kolinko>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Severity: minor    
Priority: P2    
Version: 8.0.17   
Target Milestone: ----   
Hardware: PC   
OS: All   

Description Konstantin Kolinko 2015-01-19 10:43:18 UTC
Inspired by https://stackoverflow.com/questions/27965823/

Steps to reproduce:
1. Create bin\setenv.bat
set "JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_72"

2. Start Tomcat 8 with bin\startup.bat

3. The following is observed
A) startup.bat prints:
Using JRE_HOME:        "C:\Program Files (x86)\Java\jdk1.7.0_72"

B) The following is logged by VersionLoggerListener in logs\catalina.yyyy-mm-dd.log:

18-Jan-2015 11:41:21.345 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JAVA_HOME:             C:\Program Files (x86)\Java\jdk1.7.0_72\jre

The log message is confusing, because the actual JAVA_HOME variable is pointing to a JDK, but the log message displays a different path. The message displays the value of System.getProperty("java.home"), not of an environment variable.

Change the message, s/JAVA_HOME/Java Home/.
Comment 1 Mark Thomas 2015-01-19 12:01:17 UTC
Fixed in trunk, 8.0.x (for 8.0.18 onwards) and in 7.0.x (for 7.0.58 onwards).