Questions about the Jigsaw EA builds
Alan Bateman
Alan.Bateman at oracle.com
Fri Nov 27 14:28:32 UTC 2015
On 27/11/2015 13:51, Stephane Epardaud wrote:
> Hi,
>
> I work on Ceylon, a JVM language, using a fork of javac 7 with backports
> from javac 8, and currently trying to see how to make it work with Java
> 9, which is interesting in our case as Ceylon already has modularity and
> adopted the JDK modularisation (as it was planned in Jigsaw) since Java 7.
>
> I downloaded the EA builds from https://jdk9.java.net/ and it lists two:
>
> - https://jdk9.java.net/download/ (build 93)
> - https://jdk9.java.net/jigsaw/ (build 86)
>
> Leading me to believe that the first was more recent, but it does not
> appear to include the java.annotations.common module in its lib/modules
> jimages. The second one has it, but has other differences such as having
> a jmods/ folder with ZIP module files (the format seems to be
> straightforward, but is there a specification somewhere?), and having
> only a single .jimage in lib/modules (but with more modules there).
>
> Am I right that I should use the second one?
>
> How do the build numbers relate? Are they independent ?
>
> Is the lib/modules supposed to contain one or three .jimage files?
>
> How does that relate to the jmods/ folder? Will/should javac use the
> .jimage or the jmods files? They seem to offer the same contents.
>
> Is there any documentation as to the format of the "jrt:/" NIO
> FileSystem? I've figured some things out to extract class file data from
> there, but a specification (even WIP) would be useful to verify my
> observations.
>
The JDK 9 EA builds are built from the JDK 9 master forest and are
published weekly. The module system is not in JDK 9 yet but there are a
multitude of other features and bug fixes going into JDK 9 each week.
The weekly builds are tagged with a build number, the current build that
is on the java.net download site is build 93.
The module system (as in the prototype for JSR 376 and the JDK-specific
enhancements in JEP 261) is being developed here, in Project Jigsaw. The
development is based on JDK 9. We periodically sync up the development
forest with the changes from JDK 9, we also make EA builds available. At
this time then the jigsaw/jake forest is JDK 9 build 92 + module system.
The current EA download is a bit older, it is based on JDK 9 build 86.
The module system changes a lot of things and it's often a lot a bit of
work to sync up the jigsaw/jake forest (lots of merging and adjustments
to get everything working after a big sync up). Once the design has
settled then we will integrate the module system into JDK 9 so that
should reduce the work (and the confusion with having different EA
downloads).
As regards the jrt file system then you need to start with JEP 220 [1].
I don't think there is other documentation at this time.
The jrt file system provider is in JDK 9 since late 2014. There are
several changes and bug fixes that are in the jigsaw/jake forest that
are not in JDK 9 and might not be in JDK 9 until the module system goes
in. The reason for this is that underlying jimage container is used
differently in JDK 9 vs. jigsaw/jake. We have moved to a single jimage
container file in jigsaw/jake where the classes/resources are addressed
by module. javac and other tools are using the file system API and
should not care how many container files are used in the run-time image.
The jmod files that you seeing are just packaged modules. I don't expect
you will need to be concerned with these at this point. There are many
open questions about the JMOD format so no documents to point at just
now. The linker tool consumes these packaged modules when creating
run-time images. The reason for the jmods/ directory in the EA builds is
to put everything in a single download rather than having separate
downloads and risk getting out of sync. This does make the EA downloads
bigger for the moment (much bigger because the packages modules have the
debug symbols).
-Alan.
[1] http://openjdk.java.net/jeps/220
More information about the jigsaw-dev
mailing list