--- a/src/hotspot/share/classfile/classLoaderExt.cpp Thu Sep 12 15:46:11 2019 +0100
+++ b/src/hotspot/share/classfile/classLoaderExt.cpp Thu Sep 12 09:59:19 2019 -0700
@@ -32,6 +32,7 @@
#include "classfile/modules.hpp"
#include "classfile/systemDictionaryShared.hpp"
#include "classfile/vmSymbols.hpp"
+#include "logging/log.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/filemap.hpp"
#include "memory/resourceArea.hpp"
@@ -146,7 +147,7 @@
if (found != NULL) {
// Same behavior as jdk/src/share/classes/java/util/jar/Attributes.java
// If duplicated entries are found, the last one is used.
- tty->print_cr("Warning: Duplicate name in Manifest: %s.\n"
+ log_warning(cds)("Warning: Duplicate name in Manifest: %s.\n"
"Ensure that the manifest does not have duplicate entries, and\n"
"that blank lines separate individual sections in both your\n"
"manifest and in the META-INF/MANIFEST.MF entry in the jar file:\n%s\n", tag, jar_path);
@@ -276,7 +277,7 @@
}
if (NULL == stream) {
- tty->print_cr("Preload Warning: Cannot find %s", class_name);
+ log_warning(cds)("Preload Warning: Cannot find %s", class_name);
return NULL;
}
@@ -295,7 +296,7 @@
THREAD);
if (HAS_PENDING_EXCEPTION) {
- tty->print_cr("Preload Error: Failed to load %s", class_name);
+ log_error(cds)("Preload Error: Failed to load %s", class_name);
return NULL;
}
return result;