想试试jconsole来profile一下我的代码,结果使用jconsole <pid>时,I get the following error message: "<pid> is not a managed VM." (另一种表现是:本地标签处没有显示任何可用PID),原来是我没有开启一个JVM options。解决方法(我的web是部署在Jboss中):
Eclipse中-->window-->Preference-->myeclipse-->Servers-->Jboss4-->JDK-->Optional JVM arguments
填写"-Dcom.sun.management.jmxremote",嘻嘻,就可以了