在eclipse启动以前配置下参数。 点击“Run-》Run Configurations”选择你的项目main类,而后选择Arguments,在vm arguments中添加“-Dcom.sun.management.jmxremote”eclipse