-
Bug
-
Resolution: Fixed
-
P3
-
11
-
b25
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8225996 | 14 | Erik Joelsson | P3 | Resolved | Fixed | team |
The default classlist is generated make/GenerateLinkOptData.gmk:
$(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
$(call MakeDir, $(LINK_OPT_DIR))
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $@))
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $(JLI_TRACE_FILE)))
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw \
-Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
build.tools.classlist.HelloClasslist \
$(LOG_DEBUG) 2>&1 > $(JLI_TRACE_FILE)
$(GREP) -v HelloClasslist $@.raw > $@
It just runs a simple HelloWorld app and dumps whatever class that was loaded (except for HelloClasslist). The classes that are loaded may depend on the current locale setting (e.g., sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo is loaded only for certain locales).
In order to produce a predictable classlist, we should run the above command with explicit settings of -Duser.language, -Duser.country, and/or -Duser.variant.
(See https://stackoverflow.com/questions/8809098/how-do-i-set-the-default-locale-for-my-jvm)
$(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
$(call MakeDir, $(LINK_OPT_DIR))
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $@))
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $(JLI_TRACE_FILE)))
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw \
-Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
build.tools.classlist.HelloClasslist \
$(LOG_DEBUG) 2>&1 > $(JLI_TRACE_FILE)
$(GREP) -v HelloClasslist $@.raw > $@
It just runs a simple HelloWorld app and dumps whatever class that was loaded (except for HelloClasslist). The classes that are loaded may depend on the current locale setting (e.g., sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo is loaded only for certain locales).
In order to produce a predictable classlist, we should run the above command with explicit settings of -Duser.language, -Duser.country, and/or -Duser.variant.
(See https://stackoverflow.com/questions/8809098/how-do-i-set-the-default-locale-for-my-jvm)
- backported by
-
JDK-8225996 Default CDS classlist generation should run with an explicit locale setting
-
- Resolved
-
- relates to
-
JDK-8209385 CDS runtime classpath checking is too strict when only classes from the system modules are archived
-
- Resolved
-