Windows 7 /Eclipse watchpoint on file access
Is there a way in Eclipse [Helios] on Win 7 to watch for a file to be opened? Do I have to know where the app is going to do so, or is 开发者_运维问答there a way to watch for a java.io object being created/something or other?
tia Rene
You could try setting breakpoints on the constructors of FileInputStream
and/or FileOutputStream
with conditions to check whether the filename provided matches your target filename (e.g. check the parameter on the constructors that take a filename, check the File.getName()
on the constructors that take a File
). Alternatively or in addition, you could set breakpoints on File
constructors with a condition to check whether the specified filename is your target filename.
If your breakpoint trap trips, you can follow the stacktrace to see what methods are directly or indirectly access the file.
精彩评论