--- old/src/hotspot/share/classfile/classListParser.cpp 2018-08-30 10:25:26.096554094 -0700 +++ new/src/hotspot/share/classfile/classListParser.cpp 2018-08-30 10:25:25.737520166 -0700 @@ -273,9 +273,9 @@ // This function is used for loading classes for customized class loaders // during archive dumping. InstanceKlass* ClassListParser::load_class_from_source(Symbol* class_name, TRAPS) { -#if !(defined(_LP64) && (defined(LINUX)|| defined(SOLARIS))) - // The only supported platforms are: (1) Linux/64-bit and (2) Solaris/64-bit - // +#if !(defined(_LP64) && (defined(LINUX)|| defined(SOLARIS) || defined(__APPLE__))) + // The only supported platforms are: (1) Linux/64-bit and (2) Solaris/64-bit and + // (3) MacOSX/64-bit // This #if condition should be in sync with the areCustomLoadersSupportedForCDS // method in test/lib/jdk/test/lib/Platform.java. error("AppCDS custom class loaders not supported on this platform"); --- old/test/lib/jdk/test/lib/Platform.java 2018-08-30 10:25:26.879628095 -0700 +++ new/test/lib/jdk/test/lib/Platform.java 2018-08-30 10:25:26.518593977 -0700 @@ -354,10 +354,6 @@ * This should match the #if condition in ClassListParser::load_class_from_source(). */ public static boolean areCustomLoadersSupportedForCDS() { - boolean isLinux = Platform.isLinux(); - boolean is64 = Platform.is64bit(); - boolean isSolaris = Platform.isSolaris(); - - return (is64 && (isLinux || isSolaris)); + return (is64bit() && (isLinux() || isSolaris() || isOSX())); } }