modules and bootclasspath

Mark Reinhold mr at sun.com
Fri Dec 11 12:04:35 PST 2009


> Date: Wed, 09 Dec 2009 11:05:30 -0800
> From: jonathan.gibbons at sun.com

> 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

How is -Xbootclasspath different from -bootclasspath?

>    -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").

Right; we must support something like that as part of a fully-modularized
build.

> ...
> 
> 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?

To the greatest extent possible for non-modular code that does not depend
upon the internal structure of the JRE/JDK.

I expect we'll have to support the VM's -Xbootclasspath flags when
running in non-modular mode.  It won't be pretty, and there will likely
be a performance hit, but -- sadly -- too many applications have come to
depend upon that particular bit of magic.

javac should continue to support its various -bootclasspath flags when
running in non-modular mode.

> -- do we allow or forbid any use of bootclasspath with any modular code?

Forbid.

> -- does it make sense to allow bootclasspath as a sort of implicit override of
> the default platform requirement?

Not sure what you mean here.

> -- 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?)

Yes, that makes sense.

- Mark



More information about the jigsaw-dev mailing list