Difference between revisions of "Eclipse:osgiDS"

From RifidiWiki

Jump to: navigation, search
Line 18: Line 18:
 
For a regular RCP application you don't have to touch this file and eclipse will create one for you on every run.<br/>
 
For a regular RCP application you don't have to touch this file and eclipse will create one for you on every run.<br/>
 
But we actually want to use some fairly advanced features of the underlying osgi implementation and that's where we leave the default way.<br/>
 
But we actually want to use some fairly advanced features of the underlying osgi implementation and that's where we leave the default way.<br/>
 +
[[Image:Runconfiguration.jpg]]

Revision as of 22:14, 11 May 2008

Intro

Getting declarative services into Eclipse RCP was quite a fight but with the help of some fellows from the #eclipse irc channel I finally managed to get 'em up and running.

Prerequisites

First we need to get some missing plugins.
The declarative services spec is part of the services for OSGI R4 but it is not part of the equinox that is distributed with eclipse 3.3.
So we need to go here:[1]

  • Under latest releases select 3.3.2
  • Scroll down to "Incubator" bundles
  • download org.eclipse.equinox.ds<whateverversionisthere>.jar (this is the declarative services plugin)
  • download org.eclipse.equinox.cm<whateverversionisthere>.jar (this is the OSGI admin service)
  • add the downlaoded packages to your plugins directory
  • restart eclipse

How to get it into your RCP

Now comes the tricky part.
Being used to eclipse you would think adding the plugins to your run config and then firing up your app should do the trick.
Nope, as you might have guessed, it's not that easy.
Right now we need to get our hands dirty as we have to directly have to modify the config.ini.
For a regular RCP application you don't have to touch this file and eclipse will create one for you on every run.
But we actually want to use some fairly advanced features of the underlying osgi implementation and that's where we leave the default way.
Runconfiguration.jpg

Personal tools