tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Badi <>
Subject Re: How to run Tomcat as Service on windows start up.
Date Sun, 29 Apr 2012 21:52:48 GMT
I think I got your point Mark,it has to bat file  which net beans uses 
to control tomcat.Seems like I have to go and download a fresh copy of 
tomcat , install it as service and then use the manager app to deploy 
the war file.If I play around with my existing setup, there exists a 
risk of breaking it.

Andre, you are correct I need Tomcat to run as a service on windows 
start up,seems like it will be better to download a fresh copy rather 
than playing around with existing setup.

Thanks a lot for suggestions.

On 4/30/2012 2:48 AM, André Warnier wrote:
> Mark Eggers wrote:
>>> From: André Warnier <>
>>> To: Tomcat Users List <> Sent: Saturday, 
>>> April 28, 2012 4:31 AM
>>> Subject: Re: How to run Tomcat as Service on windows start up.
>>> Jacques Desodt wrote:
>>>> Hi Kiran,
>>>> On Windows 7, you can't run batch files as services.
>>>> See :

>>>> Your first step : compile the .bat file into .exe
>>>> Then create the service, and after change the service register 
>>>> values with
>>>> regedit.
>>> I think that it is a bit more complicated that that.
>>> A .bat file compiled to a .exe will still not work properly as a 
>>> Windows service.
>>> The standard Tomcat installation for Windows does it right, by 
>>> providing a correct "service wrapper" for the JVM which runs Tomcat.
>>> The OP would probably, in the end, save himself some time by 
>>> installing a proper Tomcat-as-a-Windows-service from the Tomcat 
>>> website, and then arrange for Netbeans to talk to that one.
>> NetBeans will not talk to the service very well.
>> NetBeans uses the .bat files (.sh on Linux / UNIX) to control Tomcat. 
>> From within NetBeans you can start, stop, and restart Tomcat, or run 
>> it in debug mode.
>> NetBeans will complain that it cannot find the startup.bat and 
>> shutdown.bat required to do these tasks if you install the service.
> Presumably then, you could replace startup.bat and shutdown.bat by 
> similarly-named .bat files which respectively do
> net start "Apache Tomcat"
> and
> net stop "Apache Tomcat"
> (to keep it simple)
> Similarly, it should be possible to create .bat files which run the 
> Tomcat wrapper tomcatX.exe with the appropriate arguments to start, 
> stop, or run Tomcat in debug mode.
> No ?
> (Although, if I understood the OP's request correctly, the point here 
> would be to start Tomcat as a service as soon as Windows starts.  So 
> presumably, the necessity of having a "startup.bat" is not evident 
> anymore).
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message