You need two instructions in the bnd
descriptor. First use Include-Resource
to include the target JAR in your package:
Include-Resource: foo.jar
Then you need to specify that foo.jar should be in the bundle class path. I assume that the contents of the package itself should also be part of the bundle class path, so we must include it with a dot too:
Bundle-ClassPath: ., foo.jar
Please note that @seh's answer is that the JAR packets in your package using Private-Package
also correct (in this case, the JAR should be visible in the assembly class path). I would never use the Export-Package
for this, because I think that bundles should keep tight control over how much they export.
source share