Hi,
Allow me to participate in this conversation, what Roel De Nijs said:
According to the instructions there will be at most 1 application accessing the database file at any time, so that would be the standalone application or the network server, but never both at the same time
you can achieve this by using FileChannel.tryLock(), it helps in giving the JVM the exclusive lock over the file so now other process can lock it.
I hope you find it helpful.