256 if (c == '\0') { 257 jio_fprintf(defaultStream::error_stream(), "%s", " "); 258 } else { 259 jio_fprintf(defaultStream::error_stream(), "%c", c); 260 } 261 } 262 jio_fprintf(defaultStream::error_stream(), "\n"); 263 for (int i=0; i<error_index; i++) { 264 jio_fprintf(defaultStream::error_stream(), "%s", " "); 265 } 266 jio_fprintf(defaultStream::error_stream(), "^\n"); 267 } 268 269 vm_exit_during_initialization("class list format error.", NULL); 270 va_end(ap); 271 } 272 273 // This function is used for loading classes for customized class loaders 274 // during archive dumping. 275 InstanceKlass* ClassListParser::load_class_from_source(Symbol* class_name, TRAPS) { 276 #if !(defined(_LP64) && (defined(LINUX)|| defined(SOLARIS))) 277 // The only supported platforms are: (1) Linux/64-bit and (2) Solaris/64-bit 278 // 279 // This #if condition should be in sync with the areCustomLoadersSupportedForCDS 280 // method in test/lib/jdk/test/lib/Platform.java. 281 error("AppCDS custom class loaders not supported on this platform"); 282 #endif 283 284 if (!is_super_specified()) { 285 error("If source location is specified, super class must be also specified"); 286 } 287 if (!is_id_specified()) { 288 error("If source location is specified, id must be also specified"); 289 } 290 InstanceKlass* k = ClassLoaderExt::load_class(class_name, _source, THREAD); 291 292 if (strncmp(_class_name, "java/", 5) == 0) { 293 log_info(cds)("Prohibited package for non-bootstrap classes: %s.class from %s", 294 _class_name, _source); 295 return NULL; 296 } 297 298 if (k != NULL) { | 256 if (c == '\0') { 257 jio_fprintf(defaultStream::error_stream(), "%s", " "); 258 } else { 259 jio_fprintf(defaultStream::error_stream(), "%c", c); 260 } 261 } 262 jio_fprintf(defaultStream::error_stream(), "\n"); 263 for (int i=0; i<error_index; i++) { 264 jio_fprintf(defaultStream::error_stream(), "%s", " "); 265 } 266 jio_fprintf(defaultStream::error_stream(), "^\n"); 267 } 268 269 vm_exit_during_initialization("class list format error.", NULL); 270 va_end(ap); 271 } 272 273 // This function is used for loading classes for customized class loaders 274 // during archive dumping. 275 InstanceKlass* ClassListParser::load_class_from_source(Symbol* class_name, TRAPS) { 276 #if !(defined(_LP64) && (defined(LINUX)|| defined(SOLARIS) || defined(__APPLE__))) 277 // The only supported platforms are: (1) Linux/64-bit and (2) Solaris/64-bit and 278 // (3) MacOSX/64-bit 279 // This #if condition should be in sync with the areCustomLoadersSupportedForCDS 280 // method in test/lib/jdk/test/lib/Platform.java. 281 error("AppCDS custom class loaders not supported on this platform"); 282 #endif 283 284 if (!is_super_specified()) { 285 error("If source location is specified, super class must be also specified"); 286 } 287 if (!is_id_specified()) { 288 error("If source location is specified, id must be also specified"); 289 } 290 InstanceKlass* k = ClassLoaderExt::load_class(class_name, _source, THREAD); 291 292 if (strncmp(_class_name, "java/", 5) == 0) { 293 log_info(cds)("Prohibited package for non-bootstrap classes: %s.class from %s", 294 _class_name, _source); 295 return NULL; 296 } 297 298 if (k != NULL) { |