equal
deleted
inserted
replaced
207 |
207 |
208 if (pass == 0) { |
208 if (pass == 0) { |
209 count ++; |
209 count ++; |
210 bytes += (int)entry_size; |
210 bytes += (int)entry_size; |
211 bytes += name_bytes; |
211 bytes += name_bytes; |
212 log_info(classpath)("add main shared path (%s) %s", (cpe->is_jar_file() ? "jar" : "dir"), name); |
212 log_info(class, path)("add main shared path (%s) %s", (cpe->is_jar_file() ? "jar" : "dir"), name); |
213 } else { |
213 } else { |
214 SharedClassPathEntry* ent = shared_classpath(cur_entry); |
214 SharedClassPathEntry* ent = shared_classpath(cur_entry); |
215 if (cpe->is_jar_file()) { |
215 if (cpe->is_jar_file()) { |
216 struct stat st; |
216 struct stat st; |
217 if (os::stat(name, &st) != 0) { |
217 if (os::stat(name, &st) != 0) { |
281 for (int i=0; i<count; i++) { |
281 for (int i=0; i<count; i++) { |
282 SharedClassPathEntry* ent = shared_classpath(i); |
282 SharedClassPathEntry* ent = shared_classpath(i); |
283 struct stat st; |
283 struct stat st; |
284 const char* name = ent->_name; |
284 const char* name = ent->_name; |
285 bool ok = true; |
285 bool ok = true; |
286 log_info(classpath)("checking shared classpath entry: %s", name); |
286 log_info(class, path)("checking shared classpath entry: %s", name); |
287 if (os::stat(name, &st) != 0) { |
287 if (os::stat(name, &st) != 0) { |
288 fail_continue("Required classpath entry does not exist: %s", name); |
288 fail_continue("Required classpath entry does not exist: %s", name); |
289 ok = false; |
289 ok = false; |
290 } else if (ent->is_dir()) { |
290 } else if (ent->is_dir()) { |
291 if (!os::dir_is_empty(name)) { |
291 if (!os::dir_is_empty(name)) { |
305 " the shared archive file: %s", name); |
305 " the shared archive file: %s", name); |
306 } |
306 } |
307 } |
307 } |
308 } |
308 } |
309 if (ok) { |
309 if (ok) { |
310 log_info(classpath)("ok"); |
310 log_info(class, path)("ok"); |
311 } else if (!PrintSharedArchiveAndExit) { |
311 } else if (!PrintSharedArchiveAndExit) { |
312 _validating_classpath_entry_table = false; |
312 _validating_classpath_entry_table = false; |
313 return false; |
313 return false; |
314 } |
314 } |
315 } |
315 } |
895 return false; |
895 return false; |
896 } |
896 } |
897 char header_version[JVM_IDENT_MAX]; |
897 char header_version[JVM_IDENT_MAX]; |
898 get_header_version(header_version); |
898 get_header_version(header_version); |
899 if (strncmp(_jvm_ident, header_version, JVM_IDENT_MAX-1) != 0) { |
899 if (strncmp(_jvm_ident, header_version, JVM_IDENT_MAX-1) != 0) { |
900 log_info(classpath)("expected: %s", header_version); |
900 log_info(class, path)("expected: %s", header_version); |
901 log_info(classpath)("actual: %s", _jvm_ident); |
901 log_info(class, path)("actual: %s", _jvm_ident); |
902 FileMapInfo::fail_continue("The shared archive file was created by a different" |
902 FileMapInfo::fail_continue("The shared archive file was created by a different" |
903 " version or build of HotSpot"); |
903 " version or build of HotSpot"); |
904 return false; |
904 return false; |
905 } |
905 } |
906 if (_obj_alignment != ObjectAlignmentInBytes) { |
906 if (_obj_alignment != ObjectAlignmentInBytes) { |
924 bool status = _header->validate(); |
924 bool status = _header->validate(); |
925 |
925 |
926 if (status) { |
926 if (status) { |
927 if (!ClassLoader::check_shared_paths_misc_info(_paths_misc_info, _header->_paths_misc_info_size)) { |
927 if (!ClassLoader::check_shared_paths_misc_info(_paths_misc_info, _header->_paths_misc_info_size)) { |
928 if (!PrintSharedArchiveAndExit) { |
928 if (!PrintSharedArchiveAndExit) { |
929 fail_continue("shared class paths mismatch (hint: enable -Xlog:classpath=info to diagnose the failure)"); |
929 fail_continue("shared class paths mismatch (hint: enable -Xlog:class+path=info to diagnose the failure)"); |
930 status = false; |
930 status = false; |
931 } |
931 } |
932 } |
932 } |
933 } |
933 } |
934 |
934 |