709 |
709 |
710 // Add a module path to the _module_path_entries list. |
710 // Add a module path to the _module_path_entries list. |
711 void ClassLoader::update_module_path_entry_list(const char *path, TRAPS) { |
711 void ClassLoader::update_module_path_entry_list(const char *path, TRAPS) { |
712 assert(DumpSharedSpaces, "dump time only"); |
712 assert(DumpSharedSpaces, "dump time only"); |
713 struct stat st; |
713 struct stat st; |
714 int ret = os::stat(path, &st); |
714 if (os::stat(path, &st) != 0) { |
715 assert(ret == 0, "module path must exist"); |
715 tty->print_cr("os::stat error %d (%s). CDS dump aborted (path was \"%s\").", |
|
716 errno, os::errno_name(errno), path); |
|
717 vm_exit_during_initialization(); |
|
718 } |
716 // File or directory found |
719 // File or directory found |
717 ClassPathEntry* new_entry = NULL; |
720 ClassPathEntry* new_entry = NULL; |
718 new_entry = create_class_path_entry(path, &st, true /* throw_exception */, |
721 new_entry = create_class_path_entry(path, &st, true /* throw_exception */, |
719 false /*is_boot_append */, CHECK); |
722 false /*is_boot_append */, CHECK); |
720 if (new_entry == NULL) { |
723 if (new_entry == NULL) { |