0
@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
Bobby Rachel
  • 453
  • 6
  • 10
  • 20

2 Answers2

1

your code is right. The startwill 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 timeoutbetween the callline and the startline.

Stephan
  • 53,940
  • 10
  • 58
  • 91
0

Not sure if it will help any one but one can use timeout something like below:

@echo off set START_SERVER="C:\Program Files\Apache\Tomcat_6\bin\startup.bat" call %START_SERVER% echo "Waiting 1 minutes for the application to start" timeout /T 60 start http://localhost:8080/MyProject/