Connect Java application to photo editor
I'm pretty much stuck on this one and need you help.
I have an application which contains photos that need to be heavily edited, so I've decided to provide a click on a photo which will open photo editor (Photoshop in my case) using Runtime.exec(). This works fine. Now I need to update a photo in my application every time the photo is changed (saved) in "out of the application" photo editor.
I can check the database every few seconds and see weather the file was changed, but it is too costly since the connection to the database server is slow.
So my question is: is there any way to listen to the photo editor from the application and get info when the photo was changed, so I can upload new photo?