Installing and Uninstalling a Bundle

mToolkit offers options for convenient installation and uninstallation of bundles directly from the Eclipse development environment.

Installing a Bundle on OSGi

mToolkit offers several ways to install a bundle on a connected OSGi framework depending on whether you have it in the workspace (as a "raw" plug-in project or as a JAR file) or it is located outside the workspace.

Installing a Bundle from the Workspace

You can install a bundle from the workspace on a connected OSGi framework if there is an active plug-in project dedicated to the bundle or if the bundle is built in a JAR file.

To install a bundle from your Eclipse workspace, in one of the Eclipse navigation views (e.g. Package Explorer) right-click the plug-in project node or the JAR file node and select the target framework from the Install to menu. If you are installing the bundle from a plug-in project, the plug-in project will be built and exported to a JAR file. Then, the JAR file will be transferred to the OSGi framework and installed. In case you are installing the bundle by using a ready JAR file, the file will be directly deployed on the framework.

On success, the installed bundle will appear under the Bundles node of the framework-specific tree. If the Autostart bundles on install option from mToolkit's preferences is not selected, then the bundles being installed will not be started automatically - you have to start them yourself.

Installing a Bundle from outside the Workspace

To install a bundle from the Devices view:

  1. If more than one OSGi framework is connected, locate the target one.
  2. To install the bundle JAR, right-click the device node or the Bundles node and use Install Bundle.
  3. In the Install bundle dialog, indicate the location in the file system of the bundle JAR to install and click OK.


    Figure 1: Choosing the bundle to install

On success, the installed bundle will appear under the Bundles node of the device-specific tree.

Uninstalling a Bundle from an OSGi Runtime

To uninstall an installed bundle from the target OSGi framework, in the Frameworks view select the bundle from the framework's tree, right-click it and use Uninstall Bundle. To uninstall several bundles with a single operation, simply select all of them in the framework's tree before selecting Uninstall Bundle.

Note: You are not allowed to uninstall bundles providing vital system functionality - uninstalling one of them might lead to loss of important OSGi framework capabilities.

OSGi Management Overview
OSGi Framework Tree

Updating a Bundle
Starting and Stopping a Bundle
Connecting/Disconnecting an OSGi Runtime

Frameworks View
Frameworks View Tree Icons
Frameworks View Menus and Toolbar