src/share/vm/runtime/os.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File bug_8068687_metaindex Cdiff src/share/vm/runtime/os.cpp

src/share/vm/runtime/os.cpp

Print this page

        

*** 1221,1238 **** bool os::set_boot_path(char fileSep, char pathSep) { const char* home = Arguments::get_java_home(); int home_len = (int)strlen(home); - static const char* meta_index_dir_format = "%/lib/"; - static const char* meta_index_format = "%/lib/meta-index"; - char* meta_index = format_boot_path(meta_index_format, home, home_len, fileSep, pathSep); - if (meta_index == NULL) return false; - char* meta_index_dir = format_boot_path(meta_index_dir_format, home, home_len, fileSep, pathSep); - if (meta_index_dir == NULL) return false; - Arguments::set_meta_index_path(meta_index, meta_index_dir); - char* sysclasspath = NULL; struct stat st; // modular image if bootmodules.jimage exists char* jimage = format_boot_path("%/lib/modules/bootmodules.jimage", home, home_len, fileSep, pathSep); --- 1221,1230 ----
*** 1242,1283 **** Arguments::set_sysclasspath(jimage); return true; } FREE_C_HEAP_ARRAY(char, jimage); ! // images build if rt.jar exists ! char* rt_jar = format_boot_path("%/lib/rt.jar", home, home_len, fileSep, pathSep); ! if (rt_jar == NULL) return false; ! bool has_rt_jar = (os::stat(rt_jar, &st) == 0); ! FREE_C_HEAP_ARRAY(char, rt_jar); ! ! if (has_rt_jar) { ! // Any modification to the JAR-file list, for the boot classpath must be ! // aligned with install/install/make/common/Pack.gmk. Note: boot class ! // path class JARs, are stripped for StackMapTable to reduce download size. ! static const char classpath_format[] = ! "%/lib/resources.jar:" ! "%/lib/rt.jar:" ! "%/lib/jsse.jar:" ! "%/lib/jce.jar:" ! "%/lib/charsets.jar:" ! "%/lib/jfr.jar:" ! "%/classes"; ! sysclasspath = format_boot_path(classpath_format, home, home_len, fileSep, pathSep); ! } else { ! // no rt.jar, check if developer build with exploded modules char* modules_dir = format_boot_path("%/modules", home, home_len, fileSep, pathSep); if (os::stat(modules_dir, &st) == 0) { if ((st.st_mode & S_IFDIR) == S_IFDIR) { sysclasspath = expand_entries_to_path(modules_dir, fileSep, pathSep); } } // fallback to classes if (sysclasspath == NULL) sysclasspath = format_boot_path("%/classes", home, home_len, fileSep, pathSep); - } if (sysclasspath == NULL) return false; Arguments::set_sysclasspath(sysclasspath); return true; --- 1234,1254 ---- Arguments::set_sysclasspath(jimage); return true; } FREE_C_HEAP_ARRAY(char, jimage); ! // check if developer build with exploded modules char* modules_dir = format_boot_path("%/modules", home, home_len, fileSep, pathSep); if (os::stat(modules_dir, &st) == 0) { if ((st.st_mode & S_IFDIR) == S_IFDIR) { sysclasspath = expand_entries_to_path(modules_dir, fileSep, pathSep); } } // fallback to classes if (sysclasspath == NULL) sysclasspath = format_boot_path("%/classes", home, home_len, fileSep, pathSep); if (sysclasspath == NULL) return false; Arguments::set_sysclasspath(sysclasspath); return true;
src/share/vm/runtime/os.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File