Thursday, April 17, 2008

osgi tutorial

Installation:
If you have eclipse 3.3, you don't need any extra plugin.

OSGi tutorial

after building your bundle do the following to make jar:

* Right click on your bundle and select Export. Choose “Plug-in Development->Deployable Plugins and Fragments”.
* Select destination folder (for example /home/pc/Desktop)
* Click “Finish”

complete your plug-in:

somedir/
configuration/
config.ini
eclipse.exe
plugins/
org.eclipse.equinox.common_3.3.0.jar
org.eclipse.equinox.launcher.win32.win32.x86_1.0.0/
eclipse_1017a.dll
[other launcher fragment content]
org.eclipse.equinox.launcher_1.0.0.jar
org.eclipse.osgi_3.3.0.jar
org.eclipse.update.configurator_3.2.100.jar
< your_bundle1 >.jar
< your_bundle2 >.jar

write config.ini->>

osgi.bundles=< your_bundle1 >.jar@start,< your_bundle2 >.jar@start
osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@3:start
eclipse.ignoreApp=true
osgi.noShutdown=true


for linux, set up is same, just change the eclipse.exe, org.eclipse.equinox.launcher,org.eclipse.equinox.launcher.win32 with their linux version.

Now, execute the following command:


eclipse -console


A new console will appear.
do the following:
osgi>
osgi>ss


all the bundle will appear.

write

start < bundle id >

this will start your plugin.

example 1
example 2

Tuesday, April 15, 2008