/** Register as a Java Web Start listener */ private void registerJnlpListener() { try { sis = (SingleInstanceService) ServiceManager.lookup("javax.jnlp.SingleInstanceService"); sisL = new SISListener(); sis.addSingleInstanceListener(sisL); } catch (UnavailableServiceException e) { sis = null; logger.warn("Cannot create single instance service for web start"); } }
@Override public void finish() { sis.removeSingleInstanceListener(sisL); }