MessageResourceBundle.setAdaptor(adaptor);
	protected void initialize(FrameworkAdaptor adaptor) {		if (Profile.PROFILE && Profile.STARTUP)			Profile.logEnter("Framework.initialze()", null); //$NON-NLS-1$		long start = System.currentTimeMillis();		this.adaptor = adaptor;		active = false;		installSecurityManager();		if (Debug.DEBUG && Debug.DEBUG_SECURITY) {			Debug.println("SecurityManager: " + System.getSecurityManager()); //$NON-NLS-1$			Debug.println("ProtectionDomain of Framework.class: \n" + this.getClass().getProtectionDomain()); //$NON-NLS-1$		}		/* initialize the adaptor */		adaptor.initialize(this);		if (Profile.PROFILE && Profile.STARTUP)			Profile.logTime("Framework.initialze()", "adapter initialized"); //$NON-NLS-1$//$NON-NLS-2$		try {			adaptor.initializeStorage();			adaptor.compactStorage();		} catch (IOException e) /* fatal error */{			e.printStackTrace();			throw new RuntimeException(e.getMessage());		}		if (Profile.PROFILE && Profile.STARTUP)			Profile.logTime("Framework.initialze()", "adapter storage initialized"); //$NON-NLS-1$//$NON-NLS-2$		/*		 * This must be done before calling any of the framework getProperty		 * methods.		 */		initializeProperties(adaptor.getProperties());		/* initialize admin objects */		packageAdmin = new PackageAdminImpl(this);		SecurityManager sm = System.getSecurityManager();		if (sm != null) {			try {				permissionAdmin = new PermissionAdminImpl(this, adaptor.getPermissionStorage());			} catch (IOException e) /* fatal error */{				e.printStackTrace();				throw new RuntimeException(e.getMessage());			}			try {				condPermAdmin = new ConditionalPermissionAdminImpl(this, adaptor.getPermissionStorage());			} catch (IOException e) /* fatal error */{				e.printStackTrace();				throw new RuntimeException(e.getMessage());			}		}		if (Profile.PROFILE && Profile.STARTUP)			Profile.logTime("Framework.initialze()", "done init props & new PermissionAdminImpl"); //$NON-NLS-1$//$NON-NLS-2$		startLevelManager = new StartLevelManager(this);		/* create the event manager and top level event dispatchers */		eventManager = new EventManager("Framework Event Dispatcher"); //$NON-NLS-1$		bundleEvent = new EventListeners();		bundleEventSync = new EventListeners();		serviceEvent = new EventListeners();		frameworkEvent = new EventListeners();		if (Profile.PROFILE && Profile.STARTUP)			Profile.logTime("Framework.initialze()", "done new EventManager"); //$NON-NLS-1$ //$NON-NLS-2$		/* create the service registry */		serviceid = 1;		serviceRegistry = adaptor.getServiceRegistry();		// Initialize the installLock; there is no way of knowing 		// what the initial size should be, at most it will be the number		// of threads trying to install a bundle (probably a very low number).		installLock = new Hashtable(10);		/* create the system bundle */		createSystemBundle();		if (Profile.PROFILE && Profile.STARTUP)			Profile.logTime("Framework.initialze()", "done createSystemBundle"); //$NON-NLS-1$ //$NON-NLS-2$		/* install URLStreamHandlerFactory */		URL.setURLStreamHandlerFactory(new StreamHandlerFactory(systemBundle.context, adaptor));		/* install ContentHandlerFactory for OSGi URLStreamHandler support */		URLConnection.setContentHandlerFactory(new ContentHandlerFactory(systemBundle.context));		if (Profile.PROFILE && Profile.STARTUP)			Profile.logTime("Framework.initialze()", "done new URLStream/Content HandlerFactory"); //$NON-NLS-1$//$NON-NLS-2$		/* create bundle objects for all installed bundles. */		BundleData[] bundleDatas = adaptor.getInstalledBundles();		bundles = new BundleRepository(bundleDatas == null ? 10 : bundleDatas.length + 1, packageAdmin);		/* add the system bundle to the Bundle Repository */		bundles.add(systemBundle);		if (bundleDatas != null) {			for (int i = 0; i < bundleDatas.length; i++) {				try {					AbstractBundle bundle = AbstractBundle.createBundle(bundleDatas[i], this);					bundles.add(bundle);				} catch (BundleException be) {					// This is not a fatal error. Publish the framework event.					publishFrameworkEvent(FrameworkEvent.ERROR, systemBundle, be);				}			}		}		if (Debug.DEBUG && Debug.DEBUG_GENERAL)			System.out.println("Initialize the framework: " + (System.currentTimeMillis() - start)); //$NON-NLS-1$		if (Profile.PROFILE && Profile.STARTUP)			Profile.logExit("Framework.initialze()");	}