Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Embedding Equinox"

(Created page with "Equinox supposed the standard SPI mechanism to embed the framework in a larger application. You put the framework jar in your classpath, and proceed as follows: // Ob...")
 
m (Bimargulies.gmail.com moved page Embedding to Embedding Equinox: Fix title)
 
(No difference)

Latest revision as of 17:17, 9 May 2015

Equinox supposed the standard SPI mechanism to embed the framework in a larger application. You put the framework jar in your classpath, and proceed as follows:


      // Obtain a framework factory.
       ServiceLoader<FrameworkFactory> loader = ServiceLoader.load(FrameworkFactory.class);
       FrameworkFactory factory = loader.iterator().next();
       // And get a framework.
       framework = factory.newFramework(configProps);
       try {
           framework.init();
       } catch (BundleException e) {
           throw new SomeRuntimeException("Failed to initialize framework", e);
       }

Back to the top