Suppose a lot of what your application does deals with reading contents of files. It goes without saying that files that are opened then closed and life is good unless ... n
In ubuntu, the below lsof command works
lsof
sudo lsof -c java