mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
8027914: Client JVM silently exit with fail exit code when running in compact(1,2) with options -Dcom.sun.management and -XX:+ManagementServer
Check for sun.management.Agent class and print message and exit VM if not found at startup. Reviewed-by: dholmes, mchung
This commit is contained in:
parent
343c8d34a8
commit
ea35991cab
1 changed files with 6 additions and 3 deletions
|
@ -152,11 +152,14 @@ void Management::initialize(TRAPS) {
|
|||
// 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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue