https://bz.apache.org/bugzilla/show_bug.cgi?id=62391

            Bug ID: 62391
           Summary: Unable to Install Windows Service with Server JRE
           Product: Tomcat 8
           Version: 8.5.x-trunk
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Packaging
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ----

When attempting to install Tomcat as a Windows service, bin/service.bat checks
for the existence of java.exe and javaw.exe in the JRE's bin directory and
fails if either does not exist.

java.exe exists on all of the Java distributions for Windows, but javaw.exe
exists only on distributions that utilize GUI.

The Server JRE, which is the recommended distribution for server deployments
does not include javaw.exe, and therefore the service installation from
service.bat fails.

I checked with both Java 1.8u171 and Java 10.0.1:

$ ls -al server-jre\jdk1.8.0_171\bin\ | grep java
-rwxr-xr-x 1 Admin None  16808 Mar 28 17:15 java-rmi.exe
-rwxr-xr-x 1 Admin None 207784 Mar 28 17:15 java.exe
-rwxr-xr-x 1 Admin None  16808 Mar 28 17:15 javac.exe

$ ls -al server-jre\jdk-10.0.1\bin\ | grep java
-rwxr-xr-x 1 Admin None  150448 Mar 26 19:02 java.dll
-rwxr-xr-x 1 Admin None  232368 Mar 26 19:02 java.exe
-rwxr-xr-x 1 Admin None   17840 Mar 26 19:02 javac.exe
-rwxr-xr-x 1 Admin None  166320 Mar 26 19:02 javajpeg.dll

The fix is very easy.  The line

    if not exist "%JRE_HOME%\bin\javaw.exe" goto noJavaHome

at https://github.com/apache/tomcat/blob/trunk/bin/service.bat#L55 should be
removed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to