--- old/src/share/classes/sun/management/Agent.java 2012-04-11 14:48:00.217790277 +0800 +++ new/src/share/classes/sun/management/Agent.java 2012-04-11 14:48:00.045789432 +0800 @@ -264,8 +264,12 @@ // management properties can be overridden by system properties // which take precedence - props.putAll(System.getProperties()); - + // putAll will fail if system properties are modified + // while copying them, so we need synchronize the system properties + Properties sysProps = System.getProperties(); + synchronized (sysProps) { + props.putAll(sysProps); + } return props; }