Startup delay in Windows environment start Tomcat

Source: Internet
Author: User

If we have a power outage, we still need to open the service manually after booting. And then a remote connection is not very troublesome we can write a bat script and then set the boot up after 5 minutes to start Tomcat

First configure the environment variables:

Path Example: Java_home                E:\Java\jdk1. 6 . 0_10catalina_base            E:\Java\apache-tomcat-6.0.  in Catalina_home            E:\Java\apache-tomcat-6.0.  in Tomcat_home              E:\Java\apache-tomcat-6.0.  in

Be sure to match the environment variable or report the following error.

The CATALINA_HOME environment variable is not defined correctly this environment variable are needed to run this program

Then write the bat script

127.0.0.1-nstart  D:\apache-tomcat-7.0.73\apache-tomcat-7.0.73\bin\startup.batstart  e:\ Liuzhonghua\switchhosts\switchhosts.exe

Because the bat script doesn't have a sleep command, we're going to get the curve. Use the ping command instead of ping300 seconds, 5 minutes, and then execute the following command bat file and exe file are the start command to start

Then throw the script to the Startup folder in the specific location in the bottom left corner of Windows "All Programs" launch "right-open" to throw the bat file in

Done!!!!

Startup delay in Windows environment start Tomcat

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.