Here you can find the source of getMBeanServerDelegateName()
private static ObjectName getMBeanServerDelegateName()
//package com.java2s; //License from project: Apache License import javax.management.*; public class Main { /**//from w w w . ja v a 2 s .c om * Lookup the server delegate name, which works for sure for Java 1.6 but maye not for Java 1.5. * This method should be removed when dropping Java 1.5 support * @return the objectname of the MBeanServer delegate present in every MBeanServer */ private static ObjectName getMBeanServerDelegateName() { try { return MBeanServerDelegate.DELEGATE_NAME; } catch (NoSuchFieldError error) { // For Java 1.5 we return the fixed name return newObjectName("JMImplementation:type=MBeanServerDelegate"); } } /** * Factory method for creating a new object name, mapping any checked {@link MalformedObjectNameException} to * a runtime exception ({@link IllegalArgumentException}) * @param pName name to convert * @return the created object name */ public static ObjectName newObjectName(String pName) { try { return new ObjectName(pName); } catch (MalformedObjectNameException e) { throw new IllegalArgumentException("Invalid object name " + pName, e); } } }