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