modules and bootclasspath
Jonathan Gibbons
Jonathan.Gibbons at Sun.COM
Wed Dec 9 11:05:30 PST 2009
In an alternate reality, we would have this discussion in the context of
a change to the compiler spec. But as it is, we get to do it here.
I'm coming up with a series of questions regarding the interaction of
bootclasspath options and modules in JDK 7. More than a little, these
answers depend on what the anticipated contents of JDK 7 might be, with
respect to modules, libraries and rt.jar or its replacements.
For javac, the bootclasspath options include
-bootclasspath
-Xbootclasspath
-Xbootclasspath/p:
-Xbootclasspath/a:
-extdirs
There's also -J-Xbootclasspath, which technically speaking is a not a
javac option but an indirection to a JRE option. It's also a very
important mechanism in the way we bootstrap the JDK build. There is an
implicit assumption in the build that once we have built JDK, we can use
it to bootstrap itself ("make SKIP_BOOT_CYCLE=false").
There are a number of points along a number of axes for which we need to
determine if this is a supported combination.
1: bootclasspath specified
-- no
-- yes (meaning any of the bootclasspath related options)
2: javac source option
-- not given
-- given, less than 7 (i.e. modules not supported in language)
-- given, greater than or equal to 7 (i.e. modules supported in
language)
3: client code: module access modifier
-- no
-- yes
4: client code: module-info.java files
-- no
-- yes, but no explicit requirement on platform module
-- yes, with explicit (but possibly indirect) requirement on
platform module
Here are some issues to take into account when considering some of the
combinations:
-- how much can JDK 7 be used as "a better JDK 6" for non-modular code?
-- do we allow or forbid any use of bootclasspath with any modular code?
-- does it make sense to allow bootclasspath as a sort of implicit
override of the default platform requirement?
-- when composing the internal virtual classpath(s) in javac, can we
consider the bootclasspath options as affecting those components
identified with the platform module, however specified (implicit or
explicit?)
-- Jon
More information about the jigsaw-dev
mailing list