623 EXCEPTION_MARK; |
623 EXCEPTION_MARK; |
624 ResourceMark rm(THREAD); |
624 ResourceMark rm(THREAD); |
625 char* path = NEW_RESOURCE_ARRAY(char, end - start + 1); |
625 char* path = NEW_RESOURCE_ARRAY(char, end - start + 1); |
626 strncpy(path, &class_path[start], end - start); |
626 strncpy(path, &class_path[start], end - start); |
627 path[end - start] = '\0'; |
627 path[end - start] = '\0'; |
628 update_class_path_entry_list(path, false); |
628 if (canonicalize) { |
|
629 char* canonical_path = NEW_RESOURCE_ARRAY(char, JVM_MAXPATHLEN + 1); |
|
630 if (get_canonical_path(path, canonical_path, JVM_MAXPATHLEN)) { |
|
631 path = canonical_path; |
|
632 } |
|
633 } |
|
634 update_class_path_entry_list(path, /*check_for_duplicates=*/canonicalize); |
629 #if INCLUDE_CDS |
635 #if INCLUDE_CDS |
630 if (DumpSharedSpaces) { |
636 if (DumpSharedSpaces) { |
631 check_shared_classpath(path); |
637 check_shared_classpath(path); |
632 } |
638 } |
633 #endif |
639 #endif |