When are Java temporary files deleted?

The file won’t be deleted automatically, from the JavaDoc:

This method provides only part of a temporary-file facility. To
arrange for a file created by this method to be deleted automatically,
use the deleteOnExit() method.

So you have to explicitly call deleteOnExit():

Requests that the file or directory denoted by this abstract pathname
be deleted when the virtual machine terminates.

Leave a Comment

404 Not Found

Not Found

The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.