private BundleContext init() throws Exception {
if (framework != null) {
throw new IllegalStateException("The framework is started already");
}
ServiceDeclaration sd = ServiceDiscovery.getInstance().getServiceDeclaration(FrameworkFactory.class.getName());
Class<?> factoryCls = sd.loadClass();
FrameworkFactory factory = (FrameworkFactory)factoryCls.newInstance();
Map<Object, Object> props = new HashMap<Object, Object>();
props.put("osgi.clean", "true");
props.put("osgi.instance.area", new File("target/workspace").toURI().toString());
props.put("osgi.install.area", new File("target/eclipse").toURI().toString());