I have two batch files which I would like to run at once. So I wrote this:
@echo off
java -jar happyjar.jar
java -jar sadjar.jar
pause
When I run the script, it first runs happyjar, then runs sadjar. Is it possible to run both jars at once without running multiple batch files?
@echo off
start "Title1" java -jar happyjar.jar
start "Title2" java -jar sadjar.jar
pause
The start command runs your command in a new window, so all 3 commands would run asynchronously.
Don't add /wait option, otherwise it will wait for this new window to complete before going to the next command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With