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