I have shown below some basic steps in creating an OSGi bundle in Eclipse.
Step 1) First open your Eclipse IDE , right click on your package explorer and choose New---> Other
Step 2)Select Plug-in Project under the Plug-in Development Header.
Step 3) A new Plug-in Project window will open , beside the project name tab write my.first.bundle then click next.
Step 4) A new window appears as :
click Next
Step 5) Select the Hello Osgi Bundle template and click Finish.
Congrats your first bundle has been created
Step 6)Now to run the same... Right click on the bundle , go to Run Configurations
Step 7) Select the Osgi framework and right click on the same and click on new-> run
Once done ,now you should be able to see:
osgi> Persistence bundle starting...
Persistence bundle started.
Hello World!!
This was a basic and simple way to create and deploy a bundle in Eclipse... lots more in the making ...till then
Try this out !!!
Nice tutorial ... hope to see some more good tutorials from U !!!!
ReplyDeleteThanx Nabamita......
ReplyDeleteGood tutorial for beginners. I guess it will help me to add OSGI as one more known technology in my profile.