Bitte versuche
A. In Windows, navigate to Control Panel > Administrative Tools > Services. B. Right-click on the wherever you have TOMCAT service; select Properties. C. Switch to the Log On tab. D. Enter the password for the listed account in both the 'Password' and 'Confirm password' boxes. It may be necessary to check if the password was recently changed. Click OK.
--- Der Benutzer muss über die Berechtigung LOGON AS SERVICE verfügen
Wenn Ihre Benutzergruppe / Benutzer nicht auf diese Weise eingerichtet wurde:
1.Logon to the computer with administrative privileges. 2.Open the ‘Administrative Tools’ and open the ‘Local Security Policy’ 3.Expand ‘Local Policy’ and click on ‘User Rights Assignment’ 4.In the right pane, right-click ‘Log on as a service’ and select properties. 5.Click on the ‘Add User or Group…’ button to add the new user. 6.In the ‘Select Users or Groups’ dialogue, find the user you wish to enter and click ‘OK’ 7.Click ‘OK’ in the ‘Log on as a service Properties’ to save changes. Notes: •Ensure that the user which you have added above is not listed in the ‘Deny log on as a service’ policy in the Local Security Policy.
Um einen Windows-Dienst aus einer ausführbaren Datei für TOMCAT zu erstellen, können Sie sc.exe verwenden:
sc.exe create <new_service_name> binPath= "<path_to_the_service_executable>"
Entnommen aus: https://stackoverflow.com/questions/3582108/create-windows-service-from-executable
Oder alternativ: Verwenden Sie NSSM (den nicht saugenden Service Manager), um eine .BAT- oder eine .EXE-Datei als Dienst auszuführen.
Wenn Sie einen XAMPP-Stack oder ähnliches verwenden, haben sie eine INSTALL_TOMCAT_AS_SERVICE.BAT-Datei in Laufwerk: \ XAMPP \ tomcat.