施用JVisualVM连接tomcat

使用JVisualVM连接tomcat在catalina.sh中加入以下语句:CATALINA_OPTS-Dcom.sun.management.jmxremote -D

使用JVisualVM连接tomcat
在catalina.sh中加入以下语句:

CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8849 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=202.202.208.70"



如果不加-Djava.rmi.server.hostname=202.202.208.70会在某些机器上无法连接。详细原因待查。