Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.
// code FileChannel channel = new RandomAccessFile("fileLockTest","rw").getChannel(); FileLock lock = channel.tryLock(); // exception java.io.IOException: Invalid argument at sun.nio.ch.FileChannelImpl.lock0(Native Method) at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:924) at java.nio.channels.FileChannel.tryLock(FileChannel.java:978) at FileLockTest.obtainRefreshLock(FileLockTest.java:47)
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.