'Running the same jar file many times simultaneously with different arguments

I am trying to run the same jar multiple times simultaneously with different command line arguments

Currently I am running below in cmnd prompt

java -jar xyz.jar args1 & java -jar xyz.jar args2

I am running a particular function inside the jar for some duration. But the jar with args1 gets executed more no. of times compared with the args2. Is there any way where the jar gets executed almost same no. of times with different arguments at the same time



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source