title: java detect window process with high CPU or memory usage
body: <p>how to detect window process with high CPU or memory usage<br />
  when detected the process is high CPU or memory usage, then restart it.<br />
  For example, when the "chrome.exe" is high CPU or memory usage and detected:<br />
  Then restart the chrome</p>
  
  <pre><code>Runtime.getRuntime().exec("taskkill /im chrome.exe /f");
  Runtime.getRuntime().exec("start chrome");
  </code></pre>