Open main menu

CDOT Wiki β

OSGi : Lab Fall2011

Revision as of 12:15, 3 October 2011 by Jordan.anastasiade (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Here is the solution for your OSGi - First Lab

1. Create a Swing application (Java code) This is a Eclipse Java project. For this step, there is nothing special to be mentioned.

2. Develop a bundle that uses the Swing and export its packages (this bundle does NOT need an activator). File->New->Plugin (project name and Equinox) -> Next Do NOT generate activator->Next Do NOT create a plug-in using one of the template->Finish

Then add the code from the first project. (copy the structure) and export the package. Modify main method in the Java source file as in the source code example provided below.

3. Develop a bundle that uses the bundle created in the second step. The activator start method creates the Swing frame and the stop method closes it.

Create a new project with for a bundel this time with an activator Import the package exported by the bundle created in the second step. In the activator invoke the method to run the Swing.

The code for the ECL-Lab1 is here

SWING components