You would usually close files immediately after reading or writing, but I see that log files would stay open until the JVM exits.
Can you list all open files?
What about a shutdown hook which starts a new thread to close all those files?
Joined: Jun 11, 2012
Assuming java application program ended, can it guarantee that a file won't be locked when it exits?