Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Then, we are able to create the bundle. In the spell.english directory launch the ant command:

Code Block
shell
shell
$ ant
Buildfile: build.xml
clean:
   [delete] Deleting directory d:\clement\workspaces\sandbox\ipojo\examples\
            tutorial-ant\spell.english\output\classes
   [delete] Deleting directory d:\clement\workspaces\sandbox\ipojo\examples\
            tutorial-ant\spell.english\output
buildclasspath:
compile:
    [mkdir] Created dir: d:\clement\workspaces\sandbox\ipojo\examples\
            tutorial-ant\spell.english\output
    [mkdir] Created dir: d:\clement\workspaces\sandbox\ipojo\examples\
            tutorial-ant\spell.english\output\classes
    [javac] Compiling 1 source file to d:\clement\workspaces\sandbox\ipojo\examples\
            tutorial-ant\spell.english\output\classes
package:
      [bnd] spell.english 1
    [ipojo] Input Bundle File : d:\clement\workspaces\sandbox\ipojo\examples\
            tutorial-ant\spell.english\output\spell.english.jar
    [ipojo] Metadata File : d:\clement\workspaces\sandbox\ipojo\examples\
            tutorial-ant\spell.english\metadata.xml
    [ipojo] Start bundle manipulation
    [ipojo] Bundle manipulation - SUCCESS
    [ipojo] Output File : d:\clement\workspaces\sandbox\ipojo\examples\
            tutorial-ant\spell.english\output\spell.english.jar
BUILD SUCCESSFUL
Total time: 1 second

...

To run the example, start Felix. A distribution of Felix is provided in the felix directory. This version is configured to launch iPOJO automatically. From the Felix directory, launch the following command to start the framework. Then enter a profile name.

Code Block
shell
shell
java -jar bin/felix.jar

You can check installed bundles by using the 'ps' command:

Code Block
shell
shell
-> ps
START LEVEL 1
   ID   State        Level  Name
[   0] [Active     ] [   0] System Bundle (1.4.1)
[   1] [Active     ] [   1] Apache Felix Shell Service (1.0.2)
[   2] [Active     ] [   1] Apache Felix Shell TUI (1.0.2)
[   3] [Active     ] [   1] Apache Felix Bundle Repository (1.2.1)
[   4] [Active     ] [   1] Apache Felix iPOJO (1.2.0)
[   5] [Active     ] [   1] Apache Felix iPOJO Arch Command (1.2.0)
->

iPOJO runtime is the bundle 4. Once started, install the four created bundles as above:

Code Block
shell
shell
start file:../spell.services/output/spell.services.jar
start file:../spell.english/output/spell.english.jar
start file:../spell.checker/output/spell.checker.jar
start file:../spell.checker.gui/output/spell.checker.gui.jar

...