Reputation: 31
I need to run a two java programs from a batch script. I need to wait for the first java program to finish running before the second one starts. Is there a way to do this? I'm on a windows machine and I can't edit the java programs so I'm using a batch script to launch them.
So it would be something like this
cd %PARSEDIR%
set CLASSPATH=.\lib\jpcap-0.01.16.jar
set CLASSPATH=%CLASSPATH%;.\lib\jpcap.jar
START /WAIT java -Xms768m -Xmx768m -classpath %CLASSPATH% parser.test.firstStage %2
timeout 5
START /WAIT java -Xms768m -Xmx768m -classpath %CLASSPATH% parser.test.lastStage %2
I need the first program to finish before the the batch script moves on. How do I accomplish this?
Thanks!
edit: added what the code currently looks like
Upvotes: 3
Views: 1982