System.getProperties().put("osgi.bundles", "org.eclipse.osgi.services_1.0.0@1,org.eclipse.osgi.util_1.0.0@1,org.eclipse.core.runtime.osgi_3.0.0@2,org.eclipse.update.configurator_3.0.0@3,org.eclipse.core.applicationrunner_1.0.0@5");
System.getProperties().put("osgi.bundles", "org.eclipse.osgi.services_3.0.0@1,org.eclipse.osgi.util_3.0.0@1,org.eclipse.core.runtime.osgi_3.0.0@2,org.eclipse.update.configurator_3.0.0@3,org.eclipse.core.applicationrunner_3.0.0@5");
	public static Object run(String[] args,Runnable endSplashHandler) throws Exception {		processCommandLine(args);		if (System.getProperty("osgi.bundles") == null)			System.getProperties().put("osgi.bundles", "org.eclipse.osgi.services_1.0.0@1,org.eclipse.osgi.util_1.0.0@1,org.eclipse.core.runtime.osgi_3.0.0@2,org.eclipse.update.configurator_3.0.0@3,org.eclipse.core.applicationrunner_1.0.0@5");		setInstanceLocation();		setConfigurationLocation();		FrameworkAdaptor adaptor = null;		adaptor = createAdaptor();		OSGi osgi = new OSGi(adaptor);		if (osgi == null) 			throw new IllegalStateException("OSGi framework could not be started");		osgi.launch();		try {			if (console) 				startConsole(osgi, new String[0]);							context = osgi.getBundleContext();						publishSplashScreen(endSplashHandler);						initializeApplicationTracker();			loadBundles();			// TODO determine how long to wait here			Runnable application = (Runnable)applicationTracker.waitForService(9999999999L);			applicationTracker.close();			if (application == null)				throw new IllegalStateException("Unable to acquire application service");			application.run();		} finally {			Bundle systemBundle = context.getBundle(0);			if (systemBundle.getState() == Bundle.ACTIVE) {				final Semaphore semaphore = new Semaphore(0);				FrameworkListener listener = new FrameworkListener() {					public void frameworkEvent(FrameworkEvent event) {						if (event.getType() == FrameworkEvent.STARTLEVEL_CHANGED)							semaphore.release();					}									};				context.addFrameworkListener(listener);				systemBundle.stop();				semaphore.acquire();				context.removeFrameworkListener(listener);			}		}		// TODO for now, if an exception is not thrown from this method, we have to do		// the System.exit.  In the future we will update startup.jar to do the System.exit all 		// the time.		String exitCode = System.getProperty("eclipse.exitcode");		if (exitCode == null)			System.exit(0);		try {			System.exit(Integer.parseInt(exitCode));		} catch (NumberFormatException e) {			System.exit(13);		}		return null;	}