How does tomcat set its executable file as a windows service?

Posted by Wing C. Chen on Stack Overflow See other posts from Stack Overflow or by Wing C. Chen
Published on 2010-05-12T04:50:22Z Indexed on 2010/05/12 4:54 UTC
Read the original article Hit count: 250

Firstly, I am not at all familiar with windows batch file programing. Recently I am curious about how tomcat sets itself as a windows service using a batch file. I downloaded the service.bat file from tomcat 6. However, I still don't understand some part of it.

I guess this is the line that the batch actually register the exe file to the OS, is it right? Is there any syntax explanation?

"%EXECUTABLE%" //IS//%SERVICE_NAME% --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop

And is this used to remove the service?

"%EXECUTABLE%" //DS//%SERVICE_NAME%

And this is the setting of the parameters?

"%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions "-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\endorsed" --StartMode jvm --StopMode jvm

Thanks.

© Stack Overflow or respective owner

Related posts about Windows

Related posts about windows-services