java -modulepath
Alan Bateman
Alan.Bateman at oracle.com
Fri Jun 24 09:28:14 PDT 2011
A while back I started looking into supporting "exploded modules". Lots
of things going on (jdk7 mostly) but I've found a few cycles to do a bit
more on this so here's a brief status update.
The main update since the first prototype is that the startup has
improved greatly (as expected) after switching to PathContext and
generating the path-base configuration at startup. Native libraries are
now supported if deployed into a -bin tree that mirrors the modulepath.
So if javac compiles a module "gus" to -d mymodules (mymodules/gus/**)
then gus's native libraries are loaded from mymodules-bin/gus/lib.
Clearly any convention would need to be agreed but this one is easy to
understand. It would be easy to update jpkg and jmod to understand this
convention when creating packages or installing from a modules directory.
One of the goals with this is to use it in the JDK build so that we can
move away from the post-processing approach that we have in the jigsaw
build now. To that end, both module and legacy modes have been updated
to allow the JDK classes be in a module path structure. This should
allow us to create the equivalent of the JDK's "make all" where the
classes are compiled into a classes tree today, and a modules tree in
the future. A "make images" builds the JDK image including rt.jar today,
in the future it could create the modules image, installing the JDK
modules into the module library. This will all require coordination with
the other build changes going into jdk8 but a reasonable direction to
take as it makes incremental building very simple and fast (and
incremental builds are really important when working on the JDK).
Mandy recently published the runtime changes to support the
ModuleExports attribute. I've done an initial merge with her patch in a
side forest and added code to check that a type supplied by a remote
context is exported. Reexporting is working too although I need to do
more testing on this to verify the semantics. Once I've done that and do
a bit more clean-up then I'll send our a new webrev for review.
-Alan.
More information about the jigsaw-dev
mailing list