I think that this is possible only in the hometown. You need to access FileHandle information. Write a Dll and connect it to your java application via JNI. Call NtQuerySystemInformation with SystemHandleInformation (16). You get a list with all open handles, look for FileHandles, compare FileHandles with your own file.
source share