// Add the properties that were supplied by the caller.
frameworkProperties.putAll(properties);
// Create a standard adaptor and create the framework.
FrameworkAdaptor adaptor = new BaseAdaptor(null);
osgi = new OSGi(adaptor);
BundleContext systemContext = osgi.getBundleContext();
// Register the external service factory that can be used internally in
// order to export services outside OSGi.