Legacy mode
Alan Bateman
Alan.Bateman at oracle.com
Sun Sep 11 12:41:55 PDT 2011
Rémi Forax wrote:
>
> The JDK8 will provide a legacy mode and will have private dependencies
> on several libraries
> that are currently repackaged by adding a package prefix (com.sun.).
> Now suppose that these libraries are installed as modules,
> how the JDK will avoid conflicts with versions of these libraries
> provided by the application
> in the classpath ?
It shouldn't be any different to today. If the JDK has re-packaged an
API org.foo into com.sun.internal.org.foo and is using it internally
then it's just not going to use the org.foo API that you put on the
class path. Or maybe you are trying to put a newer version of
com.sun.internal.org.foo on the class path? That isn't going to be used
either as delegation should mean it finds the classes on the boot class
path. The usual way to override classes in rt.jar is via
-Xbootclasspath/p and that should work exactly the same in jdk8 when
running in legacy mode (-Xbootclasspath doesn't of course make sense in
modules mode and so won't be allowed).
-Alan.
More information about the jigsaw-dev
mailing list