The root modules when compiling code in the unnamed module or where the initial class is loaded from the class path

Alan Bateman Alan.Bateman at oracle.com
Mon Apr 4 12:33:11 UTC 2016


Just an FYI that the "Root modules" section of JEP 261 has been updated 
with a revised policy on the modules to resolve when compiling code in 
the unnamed module, or at runtime when the main class is loaded from the 
class path.

The key point is that "java.se" will be the only java.* root and means 
that the modules shared with Java EE won't be resolved by default. As a 
remainder, the modules that are in the transitive closure of java.se.ee 
that are not in the transitive closure of java.se are:

   java.activation
   java.annotations.common
   java.corba
   java.transaction
   java.xml.bind
   java.xml.ws

This should be a boon to Java EE servers and applications that have 
historically being built or deployed with the EE versions of these 
modules. It will be "as if" these modules don't exist in the JDK.

On the other hand, applications that use types in any of these 6 
modules, and don't deploy with the EE versions of these components, will 
need to use `-addmods` at compile-time or runtime to ensure that the 
modules are resolved.

This policy is not in place yet. We'll probably need to have it bake in 
jake for a time before we bring it into JDK 9.

-Alan

[1] http://openjdk.java.net/jeps/261


More information about the jigsaw-dev mailing list