{
if (!(loaderName instanceof ObjectName)) throw new IllegalArgumentException("Environment property " + JMXConnectorServerFactory.DEFAULT_CLASS_LOADER_NAME + " must be an ObjectName");
ObjectName name = (ObjectName)loaderName;
try
{
if (!server.isInstanceOf(name, ClassLoader.class.getName())) throw new InstanceNotFoundException();
return server.getClassLoader((ObjectName)loader);
}
catch (InstanceNotFoundException x)
{
throw new IllegalArgumentException("ObjectName " + name + " defined by environment property " + JMXConnectorServerFactory.DEFAULT_CLASS_LOADER_NAME + " must name a ClassLoader");