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