I have an eclipse plugin jface application. The stream writes the file through BufferedWriter. At the end of the recording, I close the buffer after that, I try to rename the file.
But sometimes the file is not renamed!
I tried adding a few Thread.Sleep (BIG_NUMBER) between two attempts, this did not help.
It looks like the file is getting some kind of lock. (when I kill jvm, I can rename the file).
Is there something I can do?
OS: Windows XP, Windows 7 JAVA Version: 1.5
yuris
source share