This is a classic problem that I see over and over again. The finalize() method is nice, but you shouldn't use it as your only tear-down method, especially when cleaning up files. Hopefully this posting will turn up when someone is trying to figure this out.


