boolean different = false;
	private void createSystemBundle() {		try {			systemBundle = new SystemBundle(this);			BundleDescription newSystemBundle = adaptor.getPlatformAdmin().getFactory().createBundleDescription(systemBundle.getHeaders(""), Constants.SYSTEM_BUNDLE_LOCATION, 0); //$NON-NLS-1$			if (newSystemBundle == null)				throw new BundleException(Msg.formatter.getString("OSGI_SYSTEMBUNDLE_DESCRIPTION_ERROR")); //$NON-NLS-1$			State state = adaptor.getState();			BundleDescription oldSystemBundle = state.getBundle(0);			if (oldSystemBundle != null) {				// need to check to make sure the system bundle description				// is up to date in the state.				PackageSpecification[] oldPackages = oldSystemBundle.getPackages();				PackageSpecification[] newPackages = newSystemBundle.getPackages();				boolean different = false;				if (oldPackages.length == newPackages.length) {					for (int i = 0; i < oldPackages.length; i++) {						if (oldPackages[i].getName().equals(newPackages[i].getName())) {							Object oldVersion = oldPackages[i].getVersionRange().getMinimum();							Object newVersion = newPackages[i].getVersionRange().getMinimum();							if (oldVersion == null) {								if (newVersion != null) {									different = true;									break;								}							} else if (!oldVersion.equals(newVersion)) {								different = true;								break;							}						} else {							different = true;							break;						}					}				} else {					different = true;				}				if (different) {					state.removeBundle(0);					state.addBundle(newSystemBundle);					// force resolution so packages are properly linked					state.resolve(false);				}			} else {				state.addBundle(newSystemBundle);				// force resolution so packages are properly linked				state.resolve(false);			}			SystemBundleLoader.clearSystemPackages();			PackageSpecification[] packages = newSystemBundle.getPackages();			if (packages != null) {				String[] systemPackages = new String[packages.length];				for (int i = 0; i < packages.length; i++) {					PackageSpecification spec = packages[i];					if (spec.getName().equals(Constants.OSGI_FRAMEWORK_PACKAGE)) {						String version = spec.getVersionRange().getMinimum().toString();						if (version != null)							properties.put(Constants.FRAMEWORK_VERSION, version);					}					systemPackages[i] = spec.getName();				}				// remember the system packages.				if (System.getProperty(Constants.OSGI_AUTOEXPORTSYSTEMPACKAGES) != null)					SystemBundleLoader.setSystemPackages(systemPackages);			}		} catch (BundleException e) /* fatal error */{			e.printStackTrace();			throw new RuntimeException(Msg.formatter.getString("OSGI_SYSTEMBUNDLE_CREATE_EXCEPTION", e.getMessage())); //$NON-NLS-1$		}	}