aspose file tools*
The moose likes Beginning Java and the fly likes Locking a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Locking a file" Watch "Locking a file" New topic
Author

Locking a file

William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 985

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: 985

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: 985

Oops, forgot I can't use java.nio Any other suggestions?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Locking a file