I need to implement vector clocks in a small programming exercise and I decided to use Java for it. My question is not related to the actual algorithm of manipulating the vector clocks of processes, but how to initialize other Java applications or child processes relatively easy from another Java program?
My initial plan is the following: I have a "main program", which decides how many clients/children to start and then these children/clients should communicate with each other and update their corresponding vector clocks accordingly. The number of clients to be started depends on the number of lines in a certain input file given to the "main program". What is the most elegant way to start these client processes? They should each take two files and an integer as parameters. The files tell what to do (send or advance clock) and the integer tells from which line in a configuration file the client should pick its port number to be used.