How safe is it to use Java FileLock?
问题 How safe is it to use java.nio.channels.FileLock for locking files among processes? It is stated that other processes can not access the file if we have an exclusive lock. However, the below answer on another SO question states other processes have to check for the filelock too in order for our process to be safe. (a) Are you aware that locking the file won't keep other processes from touching it unless they also use locks? So I tested my code and tried to change, a file which I have the lock