标签:
String name = ManagementFactory.getRuntimeMXBean().getName(); System.out.println(name); // get pid String pid = name.split("@")[0]; System.out.println("Pid is:" + pid);
java获取pid
原文地址:http://my.oschina.net/backtract/blog/419519