void Arguments::check_unsupported_dumping_properties() {
assert(DumpSharedSpaces, "this function is only used with -Xshare:dump");
const char* unsupported_properties[] = { "jdk.module.main",
"jdk.module.limitmods",
"jdk.module.path",
"jdk.module.upgrade.path",
"jdk.module.patch.0" };
const char* unsupported_options[] = { "-m", // cannot use at dump time
"--limit-modules", // ignored at dump time
"--module-path", // ignored at dump time
"--upgrade-module-path", // ignored at dump time
"--patch-module" // ignored at dump time
};
...
Arguments::check_unsupported_dumping_properties() prints 'option is ignored when dumping the shared archive' for --limit-modules, --module-path, --upgrade-module-path, --patch-module if they are specified at CDS dump time.
Starting from JDK 10, PlatformClassLoader and AppClassLoader are used to load the platform and app classes at dump time. The java library code that initializes the module system does take account of those module options if specified in the command line. The loading paths are affected by those options. So they are not truly 'ignored'.
Following is the proposed supporting matrix for those module options in JDK 11:
-Xshare:dump -Xshare:{on, auto}
--module-path <mp> Allow Allow
--module Allow Allow
--add-modules Allow Allow
--upgrade-module-path Disallow - exit if specified Allow - disable CDS
--patch-module Disallow - exit if specified Allow - disable CDS
--limit-modules Disallow - exit if specified Allow - disable CDS
assert(DumpSharedSpaces, "this function is only used with -Xshare:dump");
const char* unsupported_properties[] = { "jdk.module.main",
"jdk.module.limitmods",
"jdk.module.path",
"jdk.module.upgrade.path",
"jdk.module.patch.0" };
const char* unsupported_options[] = { "-m", // cannot use at dump time
"--limit-modules", // ignored at dump time
"--module-path", // ignored at dump time
"--upgrade-module-path", // ignored at dump time
"--patch-module" // ignored at dump time
};
...
Arguments::check_unsupported_dumping_properties() prints 'option is ignored when dumping the shared archive' for --limit-modules, --module-path, --upgrade-module-path, --patch-module if they are specified at CDS dump time.
Starting from JDK 10, PlatformClassLoader and AppClassLoader are used to load the platform and app classes at dump time. The java library code that initializes the module system does take account of those module options if specified in the command line. The loading paths are affected by those options. So they are not truly 'ignored'.
Following is the proposed supporting matrix for those module options in JDK 11:
-Xshare:dump -Xshare:{on, auto}
--module-path <mp> Allow Allow
--module Allow Allow
--add-modules Allow Allow
--upgrade-module-path Disallow - exit if specified Allow - disable CDS
--patch-module Disallow - exit if specified Allow - disable CDS
--limit-modules Disallow - exit if specified Allow - disable CDS
- csr for
-
JDK-8199710 Rework the support for the 'ignored' module options in CDS
-
- Closed
-
- relates to
-
JDK-8194812 Extend class-data sharing to support the module path
-
- Resolved
-