Search code examples
javaframeworkscommandchain

Java Command Process Chain Generator


I have build a Java command line application which consists of several moduls. So when you start the application via the command line, you have to pass one parameter and its options like this for example:

cmd-> java -jar application -startModul1 option1 folderPath 

OR

cmd-> java -jar application -startModul5 500 folderPath 1222 

Currently I have to start each modul by starting the application and passing the requested parameter+options. For now thats finde but later, when I have lets say 20 modules, I want to generate a proccess chain with several moduls started one after the other.

For example at the end I could start both modules from the example above with just one command.

cmd-> java -jar application -startAllModules option1 500 folderPath 1222 

Is there a framework, where I can generate such a proccess chain with existing command line modules? This should not be NOTHING programatically because I want to have some sort of xml-file or whatever, where I just configure a process chain and where I can select the modules and its parameters that should be run with one command.


Solution

  • Have you thought of turning your program into an interpreter?