I have a java program and I want to have it spy on some folders and once the folder has some new pdf files, I want to do some tasks on the new pdfs.
And I also want to avoid restarting java program (the task with pdf part) every time when new files come in because the initialization takes a long time. How can I realize it?