This content has been marked as final. Show 1 reply
both methods return an instance of an MBeanServer to work with. The difference is that the "ManagementFactory.getPlatformMBeanServer()" constructs an MBeanServer internally(by calling MBeanServerFactory.createMBeanServer)
and registers [platform's MXBeans|http://java.sun.com/javase/6/docs/api/java/lang/management/ManagementFactory.html#MXBean] a set of MBeans that provide useful metrics/info of the java runtime (eg. free memory, garbage collection info, etc).
Have a look at the documentation of the method
Hope that helps