• Post Reply Bookmark Topic Watch Topic
  • New Topic

Locking a file  RSS feed

 
William Barnes
Ranch Hand
Posts: 1048
2
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way of "locking" a file so that only one jvm can be reading/writting to it at a time?
 
William Barnes
Ranch Hand
Posts: 1048
2
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.neo FileChannel

that was a joke, ... I know it is nio, neo
 
William Barnes
Ranch Hand
Posts: 1048
2
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops, forgot I can't use java.nio Any other suggestions?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!