title: Implement wait between processes in Java?
body: <p>I would like some help understanding and implementing a 'wait until process complete' between the various processes in my application, which need to proceed in a <em>step-wise fashion</em>. My java file runs a batch file which then runs a script. At the conclusion of this there are series of commands that I need to run (through the command line) in a consecutive manner. I'm using:</p>
  
  <pre><code>Runtime.getRuntime().exec("cmd /c start " + command)
  </code></pre>
  
  <p>to run my batch files and commands (not sure if that information is relevant). Right now what is happening is that the second step that needs to occur in my application is executing before the first step (running the batch file which runs a script) has completed. I need the first step to conclude before running the next series of commands. I really hope I'm making sense!</p>