Script Package Run multiple Jar files at once.

I have two batch files that I would like to run right away. So I wrote the following:

@echo off java -jar happyjar.jar java -jar sadjar.jar pause 

When I run the script, it starts happyjar first, then it starts the sajar. Is it possible to run both banks simultaneously without running multiple batch files?

+8
java batch-file
source share
1 answer
 @echo off start "Title1" java -jar happyjar.jar start "Title2" java -jar sadjar.jar pause 

The start command launches your command in a new window, so all 3 teams will run asynchronously.

Do not add / wait, otherwise it will wait for the completion of this new window before proceeding to the next command.

+13
source share

All Articles