close

How to create a simple bundle to work on Knopflerfish?

Environment information:
OS: Fedora core 5
IDE: Eclipse 3.2.0
JRE:1.6.0 update 7
Knopflerfish: Release 2.0.0 (Knopflerfish OSGi Desktop Version 2.0.1)

Use Eclipse to create a new project.
1. File > New > Other to create a new project.
2. Choose Plug-in Development > Plug-in Project, click "Next".
3. Enter your project name, in the Target Platform, choose "an OSGi framework" and select "standard", click "Next".
4. If you want to let your bundle have a activator, select the choose box in the Plug-in Options frame and enter your activator's name. click "Next"
5. Cancel the choose box in the Templates. click "Finish".

Okay, now in the Package Explorer at left side, you can see a new project that you have created.

Then you can write some code in your Activator.java

Build your project.
1. File > Export.
2. Choose JAVA > JAR file, click "Next".
3. Select your project, and select the export destination, click "Next".
4. Don't change any more, click "Next".
5. Choose Use existing manifest from workspace and specify the MANIFES.MF for your project(always used the default file ), click "Finish".

Okay, you will see a *.jar in your project destination.

Running your *.jar
1. Running Knopflerfish OSGi Desktop
2. File > Open, select your *.jar and press "Start Bundle" button, you will see the *.jar is running.


Author: YuRu-Wei 2008/09/29 @ Shu-Te University CSIE Lab

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 YuRu 的頭像
    YuRu

    YuRu's Life

    YuRu 發表在 痞客邦 留言(0) 人氣()