Link to home
Start Free TrialLog in
Avatar of HPvH
HPvHFlag for Netherlands

asked on

Help wanted with Filewatcher Java

Hi experts. I'm working on a code to handle files with the java file watcher. Got it working, except sometimes it's throwing on exception saying the file is in use. strangely this is always the last of the pasted files. I'm sure it is not in use..well not be me anyway.

Any ideas?
Avatar of Am P
Am P
Flag of India image

Generally, it comes when a file (a handle to a file) is in use by some other process. So, you will need to check for which file the exception is encountered and see if it used by another process.

By the way, can I ask what the file watcher do ? Any associated activity (or file processing) with file watcher ?
Avatar of HPvH

ASKER

hi Panchal,

Thank you for your response and sorry for my late reaction. I'm using file watcher, because I want a program to watch a folder and act immediately when a file is dropped there. After picking up the file I look at the content and put it in a other folder, after some DB actions, for further handling.

I prefer not to use a cronjob to start program and handle file.
ASKER CERTIFIED SOLUTION
Avatar of no worries :-) no nothing
no worries :-) no nothing
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial