aspose file tools
The moose likes Beginning Java and the fly likes Locking a file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Locking a file" Watch "Locking a file" New topic
Author

Locking a file

William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 965

Is there a way of "locking" a file so that only one jvm can be reading/writting to it at a time?


Please ignore post, I have no idea what I am talking about.
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 965

java.neo FileChannel

that was a joke, ... I know it is nio, neo
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
http://java.sun.com/j2se/1.5.0/docs/api/java/nio/channels/FileLock.html


Tony Morris
Java Q&A (FAQ, Trivia)
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 965

Oops, forgot I can't use java.nio Any other suggestions?
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Locking a file
 
Similar Threads
Locking - Notification issues
NX:Some Questions(URLyBird1.3.2)
exclusive lock() yes or not?
How do I get rid of Access.LOCKFILE.9 of MS Access
URLyBird: How to design network layer?