javax.* packages need not be loaded from the parent class loader. If they are made available at all, it would be through the system bundle, which will likely get them from the parent class loader. The main issue here is that java.* packages must be shared by every bundle (i.e., it is not possible to have different versions), but javax.* packages are more like any other package and can be deployed in bundles an multiple versions may exist.

-> richard

David Leangen wrote:
Hello,

I've been having some fun lately with xml parsers. So, I reread chapter
3 of the core spec (Module Layer) to refresh my memory. (Actually, it
was as if I read it for the first time... but I digress.)

The spec says clearly in 3.4 that java.* packages are loaded from the
parent class loader. Ok, cool.

Again in 3.8.3, "The framework must always delegate any package that
starts with java. to the parent class loader". Great! Very clear. Thank
you.


However, what is less clear to me is what becomes of javax.* packages.

Are these supposed to be provided by the parent class loader, too? _All_
of them? If not, which ones? Do all frameworks work the same way, and
regardless of the VM? If not, do I need to set the
org.osgi.framework.system.packages property myself? Or do I need to add
in a bundle that provides the missing packages?

While we're on the subject, what about those org.w3c.* and org.xml.*
packages that are listed in the Java API?


Anyway, some enlightenment would be much appreciated.


Thank you!
=David.Leangen



_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to