title: How to know that a batch file that was called within java code has finished executing?
body: <pre><code>Runtime.getRuntime().exec("cmd /c start C:/Users/Desktop/Batch.bat");
  </code></pre>
  
  <p>I am running a batch file from within java that executes a database query to write a large volume of data into a file, it takes few minutes to execute. I need to present a "loading" dialog to the user that prompts him when the file generated from above is ready to use. The process starting command prompt exist immediately.So is there is any way to keep track when will the command prompt process will get over ?</p>