How to check whether files are there or not continuously in Java? [duplicate]
问题 This question already has answers here : Watching a Directory for Changes in Java (6 answers) Closed 3 years ago . I'm planning to make a program to keep checking the directory whether files exists or not. If not then wait for some time (say 5 mins sleep) and then again checks the directory. The program must keep running and should not end. I've thought of make a multi-thread program. But don't know how exactly I can implement it. And if any other options are available then please let me know