I'm going through this OSGi tutorial (with Eclipse, with the PDE addon installed):
http://www.vogella.com/tutorials/OSGi/article.html
Until task 10 everything worked fine. But now I have a problem:
The "Import-Package: org.osgi.framework;version="1.3.0" (which was auto-generated, probably because of the generated Activator class) shows the following error: "No available bundle exports package 'org.osgi.framework'"
In the Activator class I also get resolve error for classes like BundleActivator and BundleContext. I fixed this problem by using an external jar (org.eclipse.osgi), but I'm pretty sure this isn't the right way to do it, since you're supposed to declare any dependencies in the MANIFEST file.
But how do I add the org.eclipse.osgi jar so the import package line in the manifest is enough?
My entire manifest file:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Internal
Bundle-SymbolicName: com.osgi.beispiel.one.bundle.internal
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.osgi.beispiel.one.bundle.Activator
Bundle-Vendor: OSGI
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.osgi.framework;version="1.3.0"
Bundle-ActivationPolicy: lazy