配置tomcat在apache-tomcat-7.0.52/bin下创建setenv.sh文件,添加如下内容,注意下面脚本是一行。 JAVA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.net.preferIPv4Stack=true -Djava.rmi.server.hostname=192.168.56.100" 说明:-Djava.rmi.server.hostname配置的是tomcat所在机器的IP地址。 
使用VisualVM连接


使用jconsole连接

下载地址: 使用gradle打包上传jar并创建Nexus3x私有仓库步骤示例 在Windows平台安装Jenkins |