问题
@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.
- I want to launch app after server startup is done
回答1:
your code is right. The start
will run, when startup.bat
is finished.
The problem propably is in startup.bat
Propably it starts an exe-file, and then exits, before that exefile is fully started.
You can edit startup.bat
or set an timeout
between the call
line and the start
line.
来源:https://stackoverflow.com/questions/17833721/how-to-launch-application-after-server-startup-using-batch-file