AO TempFiles

project: current stablemanagement: productionpackaging: active
java: >= 7semantic versioning: 2.0.0license: LGPL v3

Java temporary file API filling-in JDK gaps and deficiencies.



  • Small and simple API for dealing with temporary files.
  • Small footprint, self-contained, no transitive dependencies - not part of a big monolithic package.
  • Java 1.7 implementation:
    • Android compatible.
    • Java EE 6+ compatible.


The Java language has a long-term and well-documented memory leak when using File.deleteOnExit(). The bug report has been open for 14 years as of the time of this writing.

We desire to not have to choose between a memory leak and garbage files possibly left behind on shutdown, thus this API was born.


There may be functionality that is also found in other projects. Please let us know if you find a small, clean, focused alternative. We always love to cure ignorance - especially our own.