System.out.println("#pid\tDisplay name");
Iterator<VirtualMachineDescriptor> it = VirtualMachine.list().iterator();
while (it.hasNext()) {
VirtualMachineDescriptor vmd = it.next();
System.out.println(vmd.id() + "\t" + vmd.displayName());
}
}
private static void loadAgent(String jarpaths, String pid) throws Exception {
final String[] ary = jarpaths.split(File.pathSeparator);