You didn’t say which OS you are running on, but if you are running on Linux you can use the lsof command
lsof -p <pid of jvm>
That will list all the files opened by the JVM. Or if you are running on Windows you can Process Explorer which will show all the open files for all the processes.
Doing this will hopefully allow you to narrow down which bit of the code is keeping the files open.