isco isco - 10 months ago 62
Java Question

import package in OSGI

Often I would see something like :


What I don't get is the use of the wild card
, why bother specifying
package-a, package-b ...
if at the end we use

I think I don't correctly understand the use of the wild card ...

Answer Source

The wildcard means that Bnd will process the class files included in the bundle for references to types not included in the bundle. Then the necessary packages will be added to the Import-Package header.

Explicitly listing packages can be used when a package is not visible to Bnd's type searching, for example dynamic class loading, or you need specify some attributes on the package.