OSGi Framework Launcher

PDE provides an OSGi Framework launcher, which allows you to launch an OSGi framework and test or debug your OSGi bundle. As with all other launchers in Eclipse (e.g. the Java Application and Java Applet launchers,...), the OSGi Framework launcher can be invoked via a shortcut, and its launch configurations are centrally managed in the Launch Configuration Dialog.

Note that in Eclipse, the words plug-in and bundle are used interchangeably. A plug-in is a bundle and a bundle is a plug-in.

Launching via a Shortcut

A quick way to test a bundle is by launching an OSGi Framework via Run As > OSGi Framework from the context menu of a plug-in project. To launch in debug mode, choose Debug As > OSGi Framework from the context menu of the plug-in project.

When a shortcut is used, PDE searches for existing OSGI Framework launch configurations and creates a new launch configuration only if none were found. If a single launch configuration is found, it is used. If multiple configurations are found, PDE presents a selection dialog containing all existing OSGi Framework launch configurations and prompts the user to choose one. If a new OSGi Framework launch configuration is created, PDE will use the default OSGi Framework which is specified on the OSGi Frameworks preference page.

Customizing a Launch Configuration

In order to have full control over launching an OSGi Framework, you can create and customize a launch configuration in the Launch Configuration Dialog.

The Launch Configuration Dialog can be invoked via Run > Run... or Debug > Debug... from the top level menu. A new OSGi Framework launch configuration can be created by double-clicking on the OSGi Framework node in the tree viewer to the left.

An OSGi Framework launch configuration contains six tabs allowing you to customize all aspects of the test launch. Please refer to the following documents for more details:

Related reference

Eclipse Application Launcher
JUnit Plug-in Test Launcher