title: How to stop a command execution in java
body: <p>Is there a way to stop a running process using java?
  I'm using this piece of code to run a command:</p>
  
  <pre><code>Process process = Runtime.getRuntime().exec(String.format("cmd /c %s", command));
  </code></pre>
  
  <p>Afterwards, I need to end/stop/terminate it.</p>
  
  <p>Does anyone knows how to do this?</p>