title: How to get shutdown hook to execute on a process launched from Eclipse
body: <p>I have a shutdown hook in my application (created using <code>Runtime.getRuntime().addShutdownHook</code>). However if I launch the application from within Eclipse, when it is shut-down the shutdown hook doesn't execute. </p>
  
  <p>I think this is because Eclipse sends the equivalent of a force-kill signal to the process, which doesn't cause the shut-down hook to execute (equivalent of taskkill /F on Windows or kill -p on Linux), though I'm not absolutely sure.</p>
  
  <p>Does anyone know how to get around this? I'm running Windows (Vista), and I've a feeling it may be a Windows-specific issue, but I'm not sure.</p>