title: Kill process which was started from Java from a batch file
body: <p>I have a third party .bat file (wso2server.bat) which start a server.</p>
  
  <p>I'm starting it by </p>
  
  <pre><code>Process process = Runtime.getRuntime.exec(cmd /C start cmd /C  C:\wso\wso2esb-4.9.0\bin\wso2server.bat);
  </code></pre>
  
  <p>I tried to stop this</p>
  
  <pre><code>process.destroy();  
  and
  process.destroyForcibly();
  </code></pre>
  
  <p>The process.isAlive() returns "false" after destroy. But the server still running! </p>
  
  <p>I also tried to run with</p>
  
  <pre><code>ProcessBuilder pb = new ProcessBuilder(params);
  process = pb.start();   
  </code></pre>
  
  <p>and stop it, but it doesn't matter, how I start it, the java.exe - and the server - still running and I can not stop it. 
  I think this is because .bat starts another process... </p>
  
  <p>So, how can I stop this java.exe?</p>