System Bundle

From OSGi Community Wiki

Jump to: navigation, search


The system bundle is a special bundle that represents the OSGi framework itself, from within that framework. It has the following roles:

The system bundle always has a bundle id of 0 (zero), so in code we can safely obtain a reference to it as follows:

Bundle systemBundle = context.getBundle(0);

Symbolic Name

The Bundle Symbolic Name of the system bundle depends on the specific framework we are running, but it has an alias that is always system.bundle. This can be used to refer to it from the manifest of another bundle, for example:

Using this alias is usually preferable since we can avoid depending on a specific framework implementation.

Personal tools
Namespaces
Variants
Actions
Navigation
JavaDoc
Wiki
Toolbox