Can't start Tomcat as Windows Service

java, tomcat, windows, windows-services

Solution

Go to Start > Configure Tomcat >

- Startup > Mode = Java

- Shutdown > Mode = Java

This worked for me!

Problem

I am using Tomcat6 on Windows 8. I am able to start Tomcat via startup.bat without error. I've copied Tomcat6.exe, Tomcat6w.exe and service.bat under tomcat/bin directory and set the .exe files to run as administrator. I open command line with administrator rights and execute "service.bat install" which ran without error. In Windows Services, I can see Apache Tomcat 6 which I want to run automatically. But both running from Windows Services using "Start" button and on start up of Windows I got the same error. "Windows could not start the Apache Tomcat 6 on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 0. When I check Windows Event Log, I see the following bizarre error. "Apache Tomcat 6 service terminated with the following service-specific error: The operation completed successfully." I tried copying msvcr71.dll under tomcat/bin directory, but nothing changed. What else can I do? Update: I am using a different port than 8080. And I saw the error below in the log file /logs/jakarta_service.log: %1 is not a valid Win32 application.

Original source