간혹, 어플리케이션을 한 컴퓨터에서 한개만 실행되게 하고 싶을때가 있죠..
특히 서버 어플리케이션 같은 경우, 2개이상 실행을 하는거 자체가 의미가 없죠…..
그래서 구글링하다보니, JUnique라는 프로젝트가 있더군요.. 적용해봐야 겠네요 ^^
The JUnique library can be used to prevent a user to run at the same time more instances of the same Java application.
JUnique implements locks and communication channels shared between all the JVM instances launched by the same user. See the documentation for more details.
JUnique requires a J2SE environment 1.4 or later.
JUnique is Free Software and it is licensed under LGPL (you will find a copy of the license bundled into the downloadable software distribution).
You can send comments and requests to Carlo Pelliccia.
Make a donation
JAVE is free, but if you find it useful please make a donation via PayPal.