指定 IntelliJ 使用的 server.xml

打开 IntelliJ 的配置

进入 Startup/Connection 标签页

编辑 Startup Script

取消选择 Use Default,点击编辑按钮,进入参数编辑窗口

添加 Program Arguments

run 后添加配置文件的地址:

1
run -config /usr/local/apache-tomcat-8.0.26/conf/server.xml

添加 VM Options

VM Options 后添加配置文件的地址:

1
2
3
4
5
-Dcom.sun.management.jmxremote.port=1099
-Dcom.sun.management.jmxremote=
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=127.0.0.1