title: How to kill a child process started by process in java?
body: <p>In the below code snippet, if I destroy <code>Process p</code> using <code>p.destroy()</code> only process <code>p</code>(i.e.<code>cmd.exe</code>) is getting destroyed. But not its child <code>iperf.exe</code>. How to terminate this process in Java.</p>
  
  <pre><code>Process p= Runtime.getRuntime().exec("cmd /c iperf -s &gt; testresult.txt");
  </code></pre>