but does nio call this NFSv4 locking,It depends on the operating system. As far as I know NIO just calls flock(). What flock() does is up to the OS.
or does this depend on the Operating System and on whose Java implementation I am using?
I sometimes see discussion of a C API into NFS. Is calling C from Java the best way to deal with this?No.
Would I call fcntl? or something else?flock().