How does tomcat set its executable file as a windows service?
- by Wing C. Chen
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.