tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Info on PermSize and MaxPermSize
Date Fri, 16 Mar 2012 07:54:12 GMT
Geet Chandra wrote:


>    Here is code snippet for registering as Windows service
> "%EXECUTABLE%" //IS//%SERVICE_NAME% --Install="C:\Program
> Files\<ProductName>\non<Product>\tomcat\b\bin\tomcat6.exe" --Jvm=auto
> --StartMode=jvm --StopMode=jvm
> --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start
> --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop
> The above code snippet is run as *.bat and being invoked from *.msi
>>> and
>>> command to start tomcat as "cmd.exe /c net start tomcat ".
>> - As utility.vbs is being included in tomcat package(*.msi) , once tomcat
>>  is installed on system, this utility.vbs is placed in
>> "C:\Program Files\<ProductName>\non<Product>\tomcat\b\bin\" folder.
>    Here is snippet for utility.vbs as
>   - WSH_Shell.Run("cmd.exe /c net " & "stop"  &
> &chr(34)&Servicename&chr(34),0,True)
>  So my question is there way to configure mentioned parameters before
> starting tomcat as Windows service.

There are different Windows packages for tomcat, different ways to install Tomcat under 
Windows, and different ways to run it.  And the answer to your original question is 
different in each case. Previously, it was not clear which way you were using.  Now it is.

First, you should consult the Tomcat FAQ, in which there is a whole section about running

under Windows.  More specifically this article :
In that page is a link to the "procrun" software documentation, which you should also read.

This all explains what the above command
 > "%EXECUTABLE%" //IS//%SERVICE_NAME% --Install="C:\Program .....
is, what it does, and how to set the appropriate parameters in the Windows Registry to 
achieve what you want to do.

Key points :
- the "-XX" command-line switches are command-line switches for the Java JVM which runs tomcat
- the Windows Service runs the program tomcat(version).exe, which is a wrapper
- the wrapper runs the JVM which runs tomcat
- the wrapper reads its parameters from the Windows Registry, including the command-line 
switches that it should pass to the JVM when it starts it
- these Registry parameters are set by the above command
"%EXECUTABLE%" //IS//%SERVICE_NAME% --Install="C:\Program ....
when you use it to install the service

If this is still not clear, come back here and ask away.

One more note : the JVM command-line switches can vary between different JVM versions. 
That's why it is also important to know which JVM version you are using.

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

View raw message