I have a scenario where i have used to open a file using the java commands in following steps
a) creating File object for the location of file
File f = new File(filePath);
b) then using system application (like Excel) to open the file
Desktop desktop = null;
if (Desktop.isDesktopSupported()) {
desktop = Desktop.getDesktop();
}
try {
desktop.open(f);
} catch (IOException e) {
}
Now I want to get informed in the program when this file is closed by the window application. Is there any mechanism to know whether the opened file is still open or closed by the application?