These days I have been involved in closing a project to build an instrument for the digital signature. The operation is pretty classic: it displays the document and decide whether or not to sign them, and automatically displays the next document, etc. ..
Technology Development: Java Development Environment: Netbeans.
Towards the end of development I realize that something is should be: the source documents, once signed were not deleted. Why? I've discovered. The whole project was about to collapse just because the function File.delete () does what he has: the file exists and is not locked but you can not delete it. If you try to delete it by hand via filesystem is cleared without problem!
I tried to delete a loop (maybe it's just a matter of time) but nothing, at the expiry of the deadline I decided to rename the file adding. The old file, waiting to find a solution.
do not deny that he did something wrong that caused this problem, beyond me, however, the scarcity of resources which provides the Java world: it seems to be used by very few people, but statistics say that is the language most widely used.
After an initial study it seems that somehow the class to see the document takes into locked the file after you extract the byte array and abandoned. Back on the internet to find some solution but nothing, as if my library was not used by anyone, but I found many sites that mention the library, but the codes are very few examples: I'd like to know if anyone uses this view and immediately remove the file.