Mercurial > hg > graal-jvmci-8
changeset 22882:ffae627760ca
8027914: Client JVM silently exit with fail exit code when running in compact(1,2) with options -Dcom.sun.management and -XX:+ManagementServer
Summary: Check for sun.management.Agent class and print message and exit VM if not found at startup.
Reviewed-by: dholmes, mchung
author | bpittore |
---|---|
date | Wed, 08 Jan 2014 20:23:16 -0500 |
parents | d68158e12cea |
children | 8461d0b03127 |
files | src/share/vm/services/management.cpp |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/services/management.cpp Wed Mar 11 13:36:57 2015 -0700 +++ b/src/share/vm/services/management.cpp Wed Jan 08 20:23:16 2014 -0500 @@ -155,11 +155,14 @@ // Load and initialize the sun.management.Agent class // invoke startAgent method to start the management server Handle loader = Handle(THREAD, SystemDictionary::java_system_loader()); - Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::sun_management_Agent(), + Klass* k = SystemDictionary::resolve_or_null(vmSymbols::sun_management_Agent(), loader, Handle(), - true, - CHECK); + THREAD); + if (k == NULL) { + vm_exit_during_initialization("Management agent initialization failure: " + "class sun.management.Agent not found."); + } instanceKlassHandle ik (THREAD, k); JavaValue result(T_VOID);