0

My External program from windows PC calls my jar thrice with different command line arguments like

java -jar xxx.jar  RT 1 runandroid ad.sh
java -jar xxx.jar RT 2 runlke adf.sh
java -jar xxx.jar RT 3 dfdf ssss.sh

my program is called but it runs in a sequential manner I want it to run in the parallel way how to achieve this.

I tried implementing the method with RT inside thread using runnable interface but still it works in sequential manner only

code snippet

jasvik
  • 75
  • 7
  • Please provide a [mcve] and show the output from an example run. – Code-Apprentice Jan 12 '22 at 04:32
  • 1
    No amount of multithreading is going to change the fact that the *calling shell* is waiting for the process to finish (short of doing insane shenanigans with daemon threads, which you *should not* do). You need to change how you invoke the program to make that happen. – Silvio Mayolo Jan 12 '22 at 04:43
  • are u asking about starting shell parallel jobs ? https://stackoverflow.com/questions/3004811/how-do-you-run-multiple-programs-in-parallel-from-a-bash-script – Yongfeng Jan 12 '22 at 05:06
  • no i want to maintain separate thread for each individual command from remote setup – jasvik Jan 12 '22 at 05:19

0 Answers0