ClassLoader::initialize_module_loader_map reads "jdk/internal/vm/cds/resources/ModuleLoaderMap.dat" resource file to determine the defining loader of a module during CDS dump time.
Dumping AppCDS archive can't invoke any java code but instead loads classes listed in a classlist by the bootstrap class loader. Then store the loader type in the archive.
This ModuleLoaderMap.dat is just a temporary workaround and should be re-examined and avoid calling it in normal application runs.
The code is currently #ifdef INCLUDE_CDS
Dumping AppCDS archive can't invoke any java code but instead loads classes listed in a classlist by the bootstrap class loader. Then store the loader type in the archive.
This ModuleLoaderMap.dat is just a temporary workaround and should be re-examined and avoid calling it in normal application runs.
The code is currently #ifdef INCLUDE_CDS
- relates to
-
JDK-8158681 ClassLoader::classloader_type() is called from code not included under #if INCLUDE_CDS
-
- Resolved
-