But I have import those things in my program:
There is a difference between imports at the Java language level, and imports between OSGi bundles.
For example, I may have a private internal class that uses another class - in this case I may need to
import it using a normal Java import (such as import com.example.MyClassImpl). But if both classes
are internal to the OSGi bundle then I don't need to mention them, or their packages, in the import or
export package instructions.
Think of Import-Package and Export-Package as describing wires between OSGi bundles - internally
your code will use Java-level imports, but as a bundle it needs to describe what classes it can share
with other bundles and what classes it needs from other bundles (or the framework).
If your bundle doesn't contain the
javax.jms.* classes then they either need to come from the system
classpath, or another bundle.
( ps. you might want to look at the Bnd tool, which can produce OSGi metadata
for you just by analyzing your classfiles - see
hope this makes things a bit clearer...
Computer School,Northwestern Polytechnical University
equinox-dev mailing list