True...we still don't have a clue what the OP's really trying to do... 

-----Original Message-----
From: Pid [mailto:p...@pidster.com] 
Sent: Friday, February 26, 2010 5:44 PM
To: Tomcat Users List
Subject: Re: Java programm to Shutdwon the tomcat server

On 26/02/2010 18:40, Joseph Morgan wrote:
> And... if you are writing a java program do to this for you, such as a UI, 
> then you'll need to essentially reverse this to start it.  PID's idea to 
> connect to the port to send the shutdown command will work for shutting it 
> down, but to start it back up... you'll still need to do 
> Runtime.getRuntime().exec(...) to get it going again from within the Java UI.

At the risk of veering off-topic: if the OP wishes to start and stop 
Tomcat programmatically then they may consider the 'embedded' Tomcat method.

 
http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/startup/Embedded.html


p

> -----Original Message-----
> From: André Warnier [mailto:a...@ice-sa.com]
> Sent: Friday, February 26, 2010 12:10 PM
> To: Tomcat Users List
> Subject: Re: Java programm to Shutdwon the tomcat server
>
>
> I suggest the following :
>
> I) If tomcat is running as a Windows service, then you should shut it
> down by stopping the Windows Service (and not by stopping down Tomcat
> directly).
>
> To stop the Tomcat-related Windows Service, there are two methods :
>
> a) use the "Services" applet of Windows
> (e.g. "My Computer" -->  Manage -->  Services and Applications -->
> Services -->  Apache Tomcat 6), right-click and choose "Stop service"
>
> b) in a command window, use the command
> net stop "Apache Tomcat 6"
>
> II) If Tomcat is not running as a Windows Service, but in a command
> window, then :
>
> a) if you have started Tomcat with the command "startup.bat", then a
> separate command window was opened to run Tomcat.
> In that case, you have 2 choices to stop Tomcat :
>
> a-1) in the same window where you started Tomcat with the command
> "startup.bat", enter the command "shutdown.bat".
>
> a-2) in the command window where Tomcat is running, enter CTRL-C
>
> b) if you have started Tomcat with the command "catalina.bat run", then
> Tomcat runs directly in the Window where you entered this command.
> To stop it, type CTRL-C.
>
> c) in any of the cases (a) or (b) above, the other methods indicated in
> the previous messages will work also.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to