I have a bundle with the following mainfest:
Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: HelloCamera Bundle-SymbolicName: HelloCamera Bundle-Version: 1.0.0.qualifier Bundle-Activator: hellocamera.Activator Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Import-Package: cameraservice, cameraserviceimpl, org.osgi.framework Layout: HelloCamera -> hellocamera -> Activator.java And a second bundle with this manifest:
Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: CameraService Bundle-SymbolicName: CameraService Bundle-Version: 1.0.0.qualifier Bundle-Localization: plugin Export-Package: cameraservice, cameraserviceimpl Import-Package: org.osgi.framework Bundle-Activator: cameraserviceimpl.Activator Layout: CameraService -> cameraservice -> CameraService.java -> cameraserviceimpl -> Activator.java -> CameraServiceImpl.java I can run the first bundle from Eclipse and everything works fine as expected. I then exported both bundles as a CameraService.jar and HelloCamera.jar respectivly
I opened up my OSGI console, java -jar equinox.jar -console and
osgi> install file:CameraService.jar osgi> install file:HelloCamera.jar osgi> ss id State Bundle 17 INSTALLED HelloCamera_1.0.0.qualifier 18 RESOLVED unknown_0.0.0 [18] then I get
The Bundle could not be resolved. Reason: Missing Constraint: Import-Package: cameraservice; version="0.0.0"
jar? Onejar, one bundle.jar" bundle. (By copying it out of the zip file, not from Eclipse.)jarfile?