--- old/src/hotspot/share/classfile/sharedClassUtil.cpp 2017-12-01 10:45:37.311921249 -0800 +++ new/src/hotspot/share/classfile/sharedClassUtil.cpp 2017-12-01 10:45:36.903905626 -0800 @@ -141,23 +141,26 @@ ResourceMark rm(THREAD); jint manifest_size; bool isSigned; - char* manifest = ClassLoaderExt::read_manifest(cpe, &manifest_size, CHECK); - if (manifest != NULL) { - ManifestStream* stream = new ManifestStream((u1*)manifest, - manifest_size); - isSigned = stream->check_is_signed(); - if (isSigned) { - ent->_is_signed = true; - } else { - // Copy the manifest into the shared archive - manifest = ClassLoaderExt::read_raw_manifest(cpe, &manifest_size, CHECK); - Array* buf = MetadataFactory::new_array(loader_data, - manifest_size, - THREAD); - char* p = (char*)(buf->data()); - memcpy(p, manifest, manifest_size); - ent->set_manifest(buf); - ent->_is_signed = false; + + if (cpe->is_jar_file()) { + char* manifest = ClassLoaderExt::read_manifest(cpe, &manifest_size, CHECK); + if (manifest != NULL) { + ManifestStream* stream = new ManifestStream((u1*)manifest, + manifest_size); + isSigned = stream->check_is_signed(); + if (isSigned) { + ent->_is_signed = true; + } else { + // Copy the manifest into the shared archive + manifest = ClassLoaderExt::read_raw_manifest(cpe, &manifest_size, CHECK); + Array* buf = MetadataFactory::new_array(loader_data, + manifest_size, + THREAD); + char* p = (char*)(buf->data()); + memcpy(p, manifest, manifest_size); + ent->set_manifest(buf); + ent->_is_signed = false; + } } } }