#!/bin/sh PID=`pidof /usr/bin/java` lsof -p $PID
Programming Tips - Java: List the names of all the files that Java has open
Date: 2015jul14
Language: Java, bash
OS: Linux
Q. Java: List the names of all the files that Java has open
A. Assuming you only have one instance of Java (eg Jetty) this script does it: