title: Gracefully kill a java (jetty/solr) process started from a windows batch file with "start /b"
body: <p>I'm starting a Java background process (Solr) from a batch file with</p>
  
  <pre><code>start /b java -jar ...
  </code></pre>
  
  <p>The problem is that <code>start /b</code> will shield the process from SIGINT signals, see <code>help start</code>. This means that <code>taskkill /pid ...</code> won't work and <code>taskkill /f /pid ...</code> will kill the process without letting it execute shutdown hooks first.</p>
  
  <p>Is there another way to start the background process on Windows from a .bat file without opening a window and without shielding it from SIGINT? Or is there another way of sending a signal to the java VM so that Solr shuts down gracefully when running from <code>start /b</code>?</p>
  
  <p>I'd like to use a normal batch script rather than VBScript or similar if possible as this is what most our users probably know best.</p>