--- old/src/share/vm/classfile/classLoader.cpp 2016-12-01 14:53:37.940310117 -0500 +++ new/src/share/vm/classfile/classLoader.cpp 2016-12-01 14:53:37.440310134 -0500 @@ -504,7 +504,7 @@ if (pkg_name != NULL) { if (!Universe::is_module_initialized()) { - location = (*JImageFindResource)(_jimage, "java.base", get_jimage_version_string(), name, &size); + location = (*JImageFindResource)(_jimage, JAVA_BASE_NAME, get_jimage_version_string(), name, &size); #if INCLUDE_CDS // CDS uses the boot class loader to load classes whose packages are in // modules defined for other class loaders. So, for now, get their module @@ -771,7 +771,7 @@ // what the base or core piece of the boot loader search is. Either a java runtime // image is present or this is an exploded module build situation. if (set_base_piece) { - assert(string_ends_with(path, MODULES_IMAGE_NAME) || string_ends_with(path, "java.base"), + assert(string_ends_with(path, MODULES_IMAGE_NAME) || string_ends_with(path, JAVA_BASE_NAME), "Incorrect boot loader search path, no java runtime image or java.base exploded build"); struct stat st; if (os::stat(path, &st) == 0) { @@ -1141,7 +1141,7 @@ ResourceMark rm; jlong size; - JImageLocationRef location = (*JImageFindResource)(jimage, "java.base", get_jimage_version_string(), MODULE_LOADER_MAP, &size); + JImageLocationRef location = (*JImageFindResource)(jimage, JAVA_BASE_NAME, get_jimage_version_string(), MODULE_LOADER_MAP, &size); if (location == 0) { vm_exit_during_initialization( "Cannot find ModuleLoaderMap location from modules jimage.", NULL); --- old/src/share/vm/classfile/modules.cpp 2016-12-01 14:53:39.828310051 -0500 +++ new/src/share/vm/classfile/modules.cpp 2016-12-01 14:53:39.344310068 -0500 @@ -283,7 +283,7 @@ } // Special handling of java.base definition - if (strcmp(module_name, "java.base") == 0) { + if (strcmp(module_name, JAVA_BASE_NAME) == 0) { define_javabase_module(module, version, location, packages, CHECK); return; } --- old/src/share/vm/runtime/arguments.cpp 2016-12-01 14:53:41.992309976 -0500 +++ new/src/share/vm/runtime/arguments.cpp 2016-12-01 14:53:41.504309993 -0500 @@ -25,6 +25,7 @@ #include "precompiled.hpp" #include "classfile/classLoader.hpp" #include "classfile/javaAssertions.hpp" +#include "classfile/moduleEntry.hpp" #include "classfile/stringTable.hpp" #include "classfile/symbolTable.hpp" #include "code/codeCacheExtensions.hpp" @@ -3427,7 +3428,7 @@ // This check is only required for java.base, all other duplicate module specifications // will be checked during module system initialization. The module system initialization // will throw an ExceptionInInitializerError if this situation occurs. - if (strcmp(module_name, "java.base") == 0) { + if (strcmp(module_name, JAVA_BASE_NAME) == 0) { if (*patch_mod_javabase) { vm_exit_during_initialization("Cannot specify java.base more than once to --patch-module"); } else {