• Post Reply Bookmark Topic Watch Topic
  • New Topic

File Locking  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am workign on a Swing application where in I am reading Some Information from Two XML files in to my application. After making some modifiactions to the readin data i am writing that back to the Same File. now I need some help in attaining lock over those two files so that untill my application is running no other programs should be allowed to read from or write in to those files.

i.e. my application should attain lock on these Files When it Starts. And that lock Should be released when the application closes


Please Help me


Thanks in advance...
[ November 01, 2006: Message edited by: Leela murthy ]
 
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

untill my application is running no other programs should be allowed to read from or write in to those files.


Am I to understand that you want these files to be locked when your application is not running? Or do you want to obtain a lock when you start your application?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!