Small set of Java tweaks without any dependencies
Using idea of file locking to somehow synchronize code in different JVM instances (applications) on the same computer.
CrossLock allows you to use lock-like functionality between multiple JVM instances on the same computer.
AppLock is based on ClossLock and allows you to run only one Java application instance at time.
Just look into javadocs and tests.
You can add this artifact to your project using JitPack.
All versions list, instructions for gradle, maven, ivy etc. can be found by link above.
To get latest commit use -SNAPSHOT instead version number.