Programmatically Start OSGi (Equinox)?

Any OSGi framework (R4.1 or later) can be started programmatically using the FrameworkFactory API: ServiceLoader<FrameworkFactory> ffs = ServiceLoader.load(FrameworkFactory.class); FrameworkFactory ff = ffs.iterator().next(); Map<String,Object> config = new HashMap<String,Object>(); // add some params to config … Framework fwk = ff.newFramework(config); fwk.start(); The OSGi framework is now running. Since Framework extends Bundle you can call getBundleContext and call … Read more