1.添加启用参数
export JMXREMOTE_PORT=${JMXREMOTE_PORT:-31050} export SERVER_HOST=${SERVER_HOST:-10.2.30.34} # Run as daemon java \ -Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.port=${JMXREMOTE_PORT} \ -Dcom.sun.management.jmxremote.rmi.port=${JMXREMOTE_PORT} \ -Dcom.sun.management.jmxremote.authenticate=false \ -Dcom.sun.management.jmxremote.ssl=false \ -jar xxx.jar
2.用VisualVM连接
链接是上面设置的参数