RandomAccessFile file
=
new
RandomAccessFile(lockFile,
"
rw
"
);
FileChannel channel
=
file.getChannel();
FileLock tryLock
=
channel.tryLock();
System.out.println(
"
try lock ok
"
+
tryLock);
posted on 2007-01-17 09:34
哈哈的日子 阅读(391)
评论(0) 编辑 收藏 所属分类:
Java