Please review the change to support dual mode launcher

Alan Bateman Alan.Bateman at Sun.COM
Tue Mar 30 07:24:35 PDT 2010


Mandy Chung wrote:
> Alan,
>
> Can you review this fix?
>
> Webrev at:
>  http://cr.openjdk.java.net/~mchung/jigsaw/dual-mode-launcher/
>
> The language tools such as javac, javap, and javah needs to access all 
> platform classes.  In legacy world, it will access the platform 
> classes from the bootclasspath.   However, in modules world, a module 
> can only access classes from its required modules.  For example, javap 
> won't be able to access xml module:
>   jdk-module-image/bin/javap javax.xml.XMLConstants
>
> So this patch will fix the launcher makefile to build javah and javap 
> to run in legacy mode like javac.   When Jon pushes  his patch for 
> javac to use the jigsaw resolver to find platform classes, javac could 
> switch to run in module mode.   I added an internal switch in the 
> launcher, -mode:legacy or -mode:module, to specify a tool to run in 
> legacy mode or module mode when running in a modules image (e.g. 
> jdk-module-image). This is temporary and only valid for jdk tools to use.
>
> Jon,
>   Does javadoc need to access platform classes like javap and javah?   
> In your patch, javac uses the jigsaw resolver to find platform 
> classes.   How about javah and javap?
>
> Thanks
> Mandy
The change seems reasonable to me. I realize the switch is 
temporary/internal only but would it be better to make it -X option? 
Maybe -Xlegacymode and -Xmodulesmode?

-Alan.




More information about the jigsaw-dev mailing list