This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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?