I have a Java program running under Windows XP. It reads the file and closes the file, or at least what it should do.
Sometimes a file remains locked and I cannot write it (āIā means me as a user trying to execute copy file2.out file1.out from the command line, where file1.out is the file that my Java program reads) until while I close my Java program. (windows complain "cannot write to a file with a connected user process" or something like that)
Any suggestions for debugging? I'm at a dead end.
explanation . The problem I am facing is not to find out if the file is kept open, or by what process it remains open. The problem is that in my Java program, I do not close the file correctly, as it is a large program, and several classes have access to the InputStream file during the opening of the InputStream .
I can narrow it down to a few classes, but I'm not sure where to look next.
source share