< prev index next >

src/hotspot/share/classfile/classLoader.cpp

Print this page

        

*** 756,766 **** path[end - start] = '\0'; struct stat st; if (os::stat(path, &st) == 0) { // File or directory found - Thread* THREAD = Thread::current(); ClassPathEntry* new_entry = create_class_path_entry(path, &st, false, false, CHECK); // If the path specification is valid, enter it into this module's list if (new_entry != NULL) { module_cpl->add_to_list(new_entry); } --- 756,765 ----
*** 826,836 **** assert(string_ends_with(path, MODULES_IMAGE_NAME) || string_ends_with(path, JAVA_BASE_NAME), "Incorrect boot loader search path, no java runtime image or " JAVA_BASE_NAME " exploded build"); struct stat st; if (os::stat(path, &st) == 0) { // Directory found - Thread* THREAD = Thread::current(); ClassPathEntry* new_entry = create_class_path_entry(path, &st, false, false, CHECK); // Check for a jimage if (Arguments::has_jimage()) { assert(_jrt_entry == NULL, "should not setup bootstrap class search path twice"); --- 825,834 ----
*** 871,881 **** const char *module_name = module_sym->as_C_string(); const char *home = Arguments::get_java_home(); const char file_sep = os::file_separator()[0]; // 10 represents the length of "modules" + 2 file separators + \0 size_t len = strlen(home) + strlen(module_name) + 10; ! char *path = NEW_C_HEAP_ARRAY(char, len, mtModule); jio_snprintf(path, len, "%s%cmodules%c%s", home, file_sep, file_sep, module_name); struct stat st; if (os::stat(path, &st) == 0) { // Directory found --- 869,879 ---- const char *module_name = module_sym->as_C_string(); const char *home = Arguments::get_java_home(); const char file_sep = os::file_separator()[0]; // 10 represents the length of "modules" + 2 file separators + \0 size_t len = strlen(home) + strlen(module_name) + 10; ! char *path = NEW_RESOURCE_ARRAY(char, len); jio_snprintf(path, len, "%s%cmodules%c%s", home, file_sep, file_sep, module_name); struct stat st; if (os::stat(path, &st) == 0) { // Directory found
*** 893,903 **** _exploded_entries->push(module_cpl); } log_info(class, load)("path: %s", path); } } - FREE_C_HEAP_ARRAY(char, path); } ClassPathEntry* ClassLoader::create_class_path_entry(const char *path, const struct stat* st, bool throw_exception, bool is_boot_append, TRAPS) { --- 891,900 ----
< prev index next >