Starting OSGi bundle

EK. picture EK. · Aug 10, 2010 · Viewed 11.1k times · Source

I try to run OSGi plug in in Eclipse. It is empty bundle, but eclipse always send me errors There are my console messages http://pastebin.com/dqQfpQhd What is wrong?

Answer

garamond picture garamond · Jun 25, 2011

The problem is that the default target includes many bundles that have nothing to do with your bundle -- typing the command ss when all the error messages have finished will list them.

Here's what you do:

  1. In Eclipse, go to Preferences > Plug-in Development > Target Platform
  2. Create a new empty target definition
  3. In the Locations tab, add a directory containing nothing but the Equinox bundle (which you can copy from the plugins directory of your Eclipse installation, the jar is named something like org.eclipse.osgi_3.7.0.v20110613.jar)
  4. Make sure the new target is active and try running your bundle again