Using —-patch-module is one option. Alternatively, you can use other new options such as: $ java --dry-run -m jdk.compiler/com.sun.tools.javac.Main
This stops before invoking the main method. or $ java —-list-modules This lists the observable modules in the image. Mandy > On Dec 22, 2016, at 1:39 AM, Erik Joelsson <erik.joels...@oracle.com> wrote: > > Hello, > > Configure has a check to see if the boot jdk is module aware/enabled. Like > many others, the build needs to adapt its behavior when using such a boot > jdk. The current check is no longer compatible with the latest JDK 9 builds: > > java -version --patch-module foo=bar > WARNING: Unknown module: foo specified in --patch-module > > I propose a simple adjustment, to instead specify java.base as the module to > patch. I also made it explicit that the directory to patch from does not > exist. > > I'm open to suggestions on better tests though, but would prefer if they can > be as simple as checking for a command line argument. > > Bug: https://bugs.openjdk.java.net/browse/JDK-8171859 > > Patch: > > diff -r 84c58139cbd3 common/autoconf/boot-jdk.m4 > --- a/common/autoconf/boot-jdk.m4 > +++ b/common/autoconf/boot-jdk.m4 > @@ -305,7 +305,9 @@ > BOOT_JDK_SOURCETARGET="-source 8 -target 8" > AC_SUBST(BOOT_JDK_SOURCETARGET) > > - ADD_JVM_ARG_IF_OK([--patch-module foo=bar], dummy, [$JAVA]) > + # Use a non existing directory as the directory will be scanned otherwise > + # and can potentially take a lot of time. > + ADD_JVM_ARG_IF_OK([--patch-module java.base=SOME_DIR_THAT_DOES_NOT_EXIST], > dummy, [$JAVA]) > AC_MSG_CHECKING([if Boot JDK supports modules]) > if test "x$JVM_ARG_OK" = "xtrue"; then > AC_MSG_RESULT([yes]) > > > /Erik >