My application saves excel file data in a database (mongodb) using java.
On user click my application will do
- First create an excel file on local
filesystemfor instanceC:\ali.xlsxand place data on excel file . - Open excel file
C:\ali.xlsxusingjava.awt.Desktopclassopenmethod for thecross platformperspective. When user close file
C:\ali.xlsxgets its close event so that i will get file updated value and save it to thedatabase.Delete the file
C:\ali.xlsxfrom the localfilesystem.
My Question :
How to implement the third bullet point.
In short : how to get close event of any file using java.
If anyone have another approach to implement this functionality please tell me also that's why I write the application flow .