Note: some system apps make this Attribute read-only,
though the MBeanInfo advertises it as read/write.
if ( libraries == null || libraries.length == 0 )
{
final String[] current = getLibraries();
if ( current.length == 0 )
{
// OK, no change
}
else
{
delegateSetAttributeNoThrow( LIBRARIES_ATTR, null );
}
}
else
{
final String SEP = getPathSeparator();
for( final String s : libraries )
{
if ( s == null || s.length() == 0 || s.indexOf( SEP ) >= 0 )
{
throw new IllegalArgumentException( StringUtil.quote( "" + s ) );
}
}
final String libs = StringUtil.toString( SEP, (Object[])libraries );
delegateSetAttributeNoThrow( LIBRARIES_ATTR, libs );
}