I need to use the org.osgi.framework.system.packages.extra property to add service interfaces at runtime. These interfaces are implemented by OSGi Bundles. I cannot compile these Bundles, because PDE cannot find the required interfaces. Is there a way to tell PDE where to look for these interfaces?
Edit: Well, I think I have to be more precise. I’m trying to integrate OSGi into an existing Java application. In order to enable the Java application to communicate with the OSGi bundles, I will use OSGi services. The Java application defines the interfaces for the OSGi services. The services are implemented in an arbitrary OSGi bundle. I provide the interface definitions to the OSGi bundles via the org.osgi.framework.system.packages.extra property at runtime. So I have no runtime problem. I have a compile time problem, because PDE do not seem do have an org.osgi.framework.system.packages.extra option for dependency resolution at compile time. Manipulating the Target Platform does not seem to help, because my interfaces are defined in a Java Project and not in a Bundle.
Under the menu Window->Preferences->Plug-in Development->Target Platform you have target definitions against which your bundles are compiled. The bundles containing your interfaces need to be in the active target definition. By default it will be pointing at your Eclipse installation folder and pick up bundles from the plugin folder, but you can create your own target definition if you want to build against specific bundles.