服务器启动后如何使用批处理文件启动应用程序? [英] How to launch application after server startup using batch file?
本文介绍了服务器启动后如何使用批处理文件启动应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
@echo off
set START_SERVER="C:\Program Files\Apache\Tomcat_6\bin\startup.bat"
call %START_SERVER%
start http://localhost:8080/MyProject/
-
服务器开始使用批处理后如何在浏览器中启动应用程序?
How to launch app in browser after server start using batch?
我上面的脚本正在启动服务器并启动应用程序..,但两者同时工作.
My above script is starting server and launching app.. but both working simultaneously.
推荐答案
您的代码正确.
startup.bat
完成后,start
将运行. 问题可能在startup.bat
中,可能是在完全启动该exe文件之前启动了一个exe文件,然后退出了. 您可以编辑startup.bat
或在call
行和start
行之间设置timeout
.your code is right. The
start
will run, whenstartup.bat
is finished. The problem propably is instartup.bat
Propably it starts an exe-file, and then exits, before that exefile is fully started. You can editstartup.bat
or set antimeout
between thecall
line and thestart
line.这篇关于服务器启动后如何使用批处理文件启动应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文