title: How do I find the process ID (pid) of a process started in java?
body: <p>If I get a process object in Java through <code>Runtime.getRuntime().exec(...)</code>, or <code>ProcessBuilder.start()</code>, I can wait for it through <code>Process.waitFor()</code>, which is like <code>Thread.join()</code>, or I could kill it with <code>Process.destroy()</code>, which is like the deprecated <code>Thread.stop()</code>.</p>
  
  <p>BUT: How do I find the pid of the Process Object? I don't see a method for doing that in <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Process.html" rel="noreferrer">The Official Documentation</a>. Can I do this in Java? If so, how?</p>