title: java to lock file
body: <p>I have a java standalone application which will process files from a directory.This java application runs in AIX box triggered by a cron job which runs every 1 min once.My aim is if one invocation of the java application accesses a particular file in that directory,that file should get locked for access by the second or other invocations until the first java invocation processes it and releases the lock.</p>
  
  <p>Is there any way in java to lock the file programmatically ?This code should work in AIX particularly</p>