Possible Duplicate:
How can I lock a file using java (if possible)
Is it possible to lock file so that other apps cannot write to file but can still run it normally? My target platform is windows.
File yourFile = new File("yourFile.txt");
yourFile.setWritable(false);
Look at FileChannel's lock() API.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论