title: DeleteOnExit jvm shutdown
body: <p>I currently have a tomcat webapp that needs files deleted when the JVM is being shutdown.  I created a custom ContextLoaderListener to handle the contextDestroyed event.  Inside of here I call deleteOnExit on the appropriate files.  However, ever since jdk 1.6.0_14 I am unable to deleteOnExit.  Googling indicates that there was a change that is somewhat expected, but I haven't seen a work around for this.  Anyone have any ideas?</p>
  
  <p>Below code does NOT work.</p>
  
  <pre><code>for(File f : myFileList)
  try{
      f.deleteOnExit()
  } finally {
      f.delete()
  }
  </code></pre>