src/share/vm/services/management.cpp

Print this page

        

@@ -154,11 +154,15 @@
     Handle loader = Handle(THREAD, SystemDictionary::java_system_loader());
     Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::sun_management_Agent(),
                                                    loader,
                                                    Handle(),
                                                    true,
-                                                   CHECK);
+                                                   THREAD);
+    if (HAS_PENDING_EXCEPTION) {
+      vm_exit_during_initialization("Management agent initialization failure: "
+          "class sun.management.Agent not found.");
+    }
     instanceKlassHandle ik (THREAD, k);
 
     JavaValue result(T_VOID);
     JavaCalls::call_static(&result,
                            ik,