153 HandleMark hm(THREAD); |
153 HandleMark hm(THREAD); |
154 |
154 |
155 // Load and initialize the sun.management.Agent class |
155 // Load and initialize the sun.management.Agent class |
156 // invoke startAgent method to start the management server |
156 // invoke startAgent method to start the management server |
157 Handle loader = Handle(THREAD, SystemDictionary::java_system_loader()); |
157 Handle loader = Handle(THREAD, SystemDictionary::java_system_loader()); |
158 Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::sun_management_Agent(), |
158 Klass* k = SystemDictionary::resolve_or_null(vmSymbols::sun_management_Agent(), |
159 loader, |
159 loader, |
160 Handle(), |
160 Handle(), |
161 true, |
161 THREAD); |
162 CHECK); |
162 if (k == NULL) { |
|
163 vm_exit_during_initialization("Management agent initialization failure: " |
|
164 "class sun.management.Agent not found."); |
|
165 } |
163 instanceKlassHandle ik (THREAD, k); |
166 instanceKlassHandle ik (THREAD, k); |
164 |
167 |
165 JavaValue result(T_VOID); |
168 JavaValue result(T_VOID); |
166 JavaCalls::call_static(&result, |
169 JavaCalls::call_static(&result, |
167 ik, |
170 ik, |