How to run an OSGi framework within usual java-code?
问题 Can anybody give me an example how to use the osgi framework classes? I haven't a clue how to use those classes ... BR, Markus 回答1: It dependes on which OSGi implementation you are using. I use Eclipse Equinox and start the framework from within a regular java class. The Eclipse jar (called org.eclipse.osgi_longversion.jar) has a class called org.eclipse.core.runtime.adaptor.EclipseStarter. This will boot your OSGi framework. Properties props = new Properties(); // add some properties to