Question about FileManagers in Jigsaw.
Jonathan Gibbons
jonathan.gibbons at oracle.com
Tue Mar 13 15:26:06 PDT 2012
On 03/13/2012 02:11 PM, Fredrik Öhrström wrote:
> ----- jonathan.gibbons at oracle.com skrev:
>
>> The hybrid/bootstrap javac initially runs on the BOOTDIR java. The
>> intent is that hybrid javac is good enough to create enough JDK 8
>> classes which can be run on the new JDK 8 JVM in legacy/classpath mode
>> to create a basic module library containing a real base module. That
>> should be good enough to run hybrid/bootstrap javac such that it now
>> has access to the real Jigsaw library API, and so does not need to use
>> ZeroMod for compiling the rest of JDK.
> So we bootstrap the entire jdk? Something like this:
> 1) Build hybrid/bootstrap javac (includes zeromod + fake linking to jdk)
> 2) Build entire jdk (includes langtools) and jvm using this bootstrap
> javac.
> this jdk runs in legacy/classpath mode. But has enough modules (a
> single base module)
> to understand proper modules.
> 3) Build hybrid/bootstrap javac again! Now it does not need zeromod,
> it still needs genstubs fake linking though.
> 4) Build the entire jdk (includes langtools) and jvm using this second
> bootstrap javac.
> this jdk will have all modules!
>
> Is this correct?
>
> //Fredrik
Well, not quite. If I understand correctly what you have written,
you're still building javac 3 times, in 1, 3, 4, and you're building JDK
twice.
Step 3 is redundant and equivalent to 1. ZeroMod is always present: it
is currently a small nested class in javac.comp.Modules. Whether or not
to use it is a runtime decision largely based on the availability of the
jigsaw library API. ZeroMod is substantially less functional than the
full Jigsaw module resolver, and so can only be used in limited
situations, such as the base module.
Step 4 should be unnecessary.
And, you need to build Hotspot and all the native libraries.
So, here's what Mandy and I think we need:
# start bootstrap
1) Build hybrid/bootstrap javac using BOOTDIR javac on BOOTDIR java
(includes zeromod + fake linking to jdk)
# build minimal new JDK runtime
2a) Compile Hotspot
2b) Compile base module using hybrid/bootstrap javac on BOOTDIR java
2c) Compile native libs for base module
# build rest of JDK modules
3a) Compile all other modules, including langtools, using
hybrid/bootstrap javac on new JDK runtime in classpath mode
3b) Compile native libs for each module
# Dev usage
4) Devs can work with and run the modules compiled in 2, 3 using modulepath
# Product bits
5) For final image, modules compiled in 2, 3 get converted to .jmod
files and installed in library, using new jmod and jpkg on new JDK runtime
-- Jon
More information about the jigsaw-dev
mailing list