public SingleInstance(SingleInstanceCallback callback) {
this.callback = callback;
try {
service = (SingleInstanceService) ServiceManager.lookup("javax.jnlp.SingleInstanceService");
listener = new SingleInstanceListener() {
public void newActivation(String[] args) {
SingleInstance.this.callback.newActivation(args);
}
};
service.addSingleInstanceListener(listener);