title: java exec return PID in Windows
body: <p>In linux I can run:</p>
  
  <pre><code>System.exec('echo test &amp; echo $1');
  </code></pre>
  
  <p>Which will return the process ID of the command I have executed. How can a similar aproach be translated into Windows? Allowing me to execute a command and return its PID.</p>
  
  <p>Just to be clear I am not looking for the PID of my JAVA application. I am looking for the process ID of an external application spawned by JAVA using <code>System.exec</code>.</p>
  
  <p>Thanks</p>