Java exec detects where the Tomcat service is in (normal, start or stop, stop state)

Source: Internet
Author: User


Thought: Check with cmd command

Normal operation: cmd/c net start outputs the list that has been started, compared to whether it is in the list

Start or stop in: cmd/c net start tomcat outputs relationship hints in start or stop

Stop state: Above two, is stop state

Extended:

Originally wanted to use cmd Startup.bat boot is tomcat, then this state (starting) is saved to the database

With cmd startdown.bat off is Tomcat, then this state (stopping) is saved to the database

It also takes time to start and shut down, to check if it's up or down, to detect if HTTP is accessible, a bit of a hassle, to add Tomcat to the service

It's better to judge.

Java exec detects where the Tomcat service is in (normal, start or stop, stop state)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.