tomcat设置可被jconsole监控:
在catalina.bat或catalina.sh里面加上。
set JAVA_OPTS=-Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
jvm并不是立即回收,而不是占用内存达到一定比例(比如90%),