--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp Tue Jul 18 15:43:07 2017 +0200
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp Tue Jul 18 15:46:04 2017 -0400
@@ -2122,12 +2122,15 @@
// Preload commonly used klasses
WKID scan = FIRST_WKID;
// first do Object, then String, Class
+#if INCLUDE_CDS
if (UseSharedSpaces) {
initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Object_klass), scan, CHECK);
// Initialize the constant pool for the Object_class
Object_klass()->constants()->restore_unshareable_info(CHECK);
initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Class_klass), scan, CHECK);
- } else {
+ } else
+#endif
+ {
initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Class_klass), scan, CHECK);
}