Pacerier
Pacerier

Reputation: 89663

why do we need to run shutdown.bat for tomcat

i start tomcat by running startup.bat and there will be a small cmd-window running the tomcat. After that i wanted to stop tomcat and I close that window.

And topcat stopped. so what is the point of shutdown.bat?

Upvotes: 3

Views: 1605

Answers (2)

michael
michael

Reputation: 9779

Most applications can be shutdown in more than one way; there's the "graceful" way, where a program can clean up after itself; the less-than graceful way, where a program can try to catch a shutdown (termination) signal; and the harsh way, where a program is "killed" (kill -9 in unix). Closing the window is probably closer to the second way.

And of course it wouldn't work very well if you didn't have access to a windowing environment on a remote server.

Upvotes: 4

Isaac Truett
Isaac Truett

Reputation: 8884

shutdown.bat allows Tomcat to clean up after itself, if it needs to. The functionality to shutdown from a command instead of just closing a window also allows for remote management.

Upvotes: 5

Related Questions