ClassLoader.getPackages()

David Holmes david.holmes at oracle.com
Mon May 21 18:55:20 PDT 2012


On 22/05/2012 3:28 AM, Mandy Chung wrote:
> What ClassLoader.getPackages() should do in modular world is an open
> issue [1] that requires further investigation and discussion. As you
> said, Packages assume a strict parent-delegation hierachy. Also it is
> tied with JAR manifest where the package information is specified. One
> thought is that java.lang.Package will not be applicable in module mode
> and ClassLoader.getPackages() may just throw exception but the question
> would be how existing applications use java.lang.Package API and its
> implication. Basically it's yet to determine what the existing
> ClassLoader methods means in module mode that makes sense and also
> requires evaluating its impact to existing applications.

It seems to me the problem is with the "parent" part of this, not with 
Packages per-se.

More generally I'm yet to see a clear description of how the new 
module-loader architecture maps into all the existing hierarchical-based 
classloading semantics - such as permissions.

David
-----

> Mandy
> [1] http://openjdk.java.net/projects/jigsaw/doc/module-class-loading.pdf
>



More information about the jigsaw-dev mailing list