Folks, I have a conceptual problem that I can use some help on.
Lets say I have an application that stores any kind of data file in
a database. Said database entries would be represented visually
to an end user. When double-clicking on any such entry, the will
be downloaded to some temporary folder and 'executed' (i.e.
whatever program is associated with the file will launch and
load it).

Would there be any reasonable way to check if a user has
finished with the file, and if so if the file was changed (so it
could be uploaded back to the db server as 'modified')?

I considered timers and loops to do the job, but this sucks
away alot of processing time unnecessarily. I also considered low
level file system hooking (platform dependent code), but that
defeats the benefits of java.

So, any ideas / advice?

-CC