Author: markt
Date: Mon Oct  9 12:27:29 2017
New Revision: 1811560

URL: http://svn.apache.org/viewvc?rev=1811560&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=61590
Enable service.bat to recognise when JAVA_HOME is configured for a Java 9 JDK.

Modified:
    tomcat/trunk/bin/service.bat
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/bin/service.bat
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/bin/service.bat?rev=1811560&r1=1811559&r2=1811560&view=diff
==============================================================================
--- tomcat/trunk/bin/service.bat (original)
+++ tomcat/trunk/bin/service.bat Mon Oct  9 12:27:29 2017
@@ -55,9 +55,16 @@ if not exist "%JRE_HOME%\bin\java.exe" g
 if not exist "%JRE_HOME%\bin\javaw.exe" goto noJavaHome
 goto okJavaHome
 :gotJdkHome
-if not exist "%JAVA_HOME%\jre\bin\java.exe" goto noJavaHome
-if not exist "%JAVA_HOME%\jre\bin\javaw.exe" goto noJavaHome
 if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome
+rem Java 9 has a different directory structure
+if exist "%JAVA_HOME%\jre\bin\java.exe" goto preJava9Layout
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+if not exist "%JAVA_HOME%\bin\javaw.exe" goto noJavaHome
+if not "%JRE_HOME%" == "" goto okJavaHome
+set "JRE_HOME=%JAVA_HOME%"
+goto okJavaHome
+:preJava9Layout
+if not exist "%JAVA_HOME%\jre\bin\javaw.exe" goto noJavaHome
 if not "%JRE_HOME%" == "" goto okJavaHome
 set "JRE_HOME=%JAVA_HOME%\jre"
 goto okJavaHome

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1811560&r1=1811559&r2=1811560&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Oct  9 12:27:29 2017
@@ -91,6 +91,10 @@
         such attempted use of the endorsed directory mechanism will trigger an
         error and Tomcat will fail to start. (rjung)
       </fix>
+      <fix>
+        <bug>61590</bug>: Enable <code>service.bat</code> to recognise when
+        <code>JAVA_HOME</code> is configured for a Java 9 JDK. (markt)
+      </fix>
     </changelog>
   </subsection>
 </section>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to