lsof
is a nice tool for Unix, showing all currently open file handles.
Does anyone know a similar tool that would show all open files inside a running JVM (via JVMTI or any similar interface)?
In this particular case, it would be sufficient for me to know which class has a handle open. Method/line or even an entire chain to GC root would be fantastic, but handler owner class is already a good start.
I know I could make a heap dump, open it in a profiler and find this out, but this is a tedious task, especially for the big heaps.