if (bootMgr != 0) { try { framework.stopBundle(bootMgr); } catch (BundleException e) { System.err.println("Stop of BootManager failed, " + e.getNestedException()); } } framework.shutdown();
restarting = true;
        public Object run() {          Thread t = new Thread() {              public void run() {                if (bootMgr != 0) {                  try {                    framework.stopBundle(bootMgr);                  } catch (BundleException e) {                    System.err.println("Stop of BootManager failed, " +                                       e.getNestedException());                  }                }                framework.shutdown();                try {                  if (bootMgr != 0) {                    framework.launch(bootMgr);                  } else {                    framework.launch(0);                  }                } catch (Exception e) {                  println("Failed to restart framework", 0);                }              }            };          t.setDaemon(false);          t.start();          return null;        }