tomcat远程调试

方法1:适用于tomcat6

修改startup.bat 在尾部修改成以下列方式启动

set JPDA_ADDRESS=8000
set JPDA_TRANSPORT=dt_socket
call "%EXECUTABLE%" jpda start

其它的java远程调试,在jvm上添加如下参数:
-Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=y

方法2:适用于tomcat5
修改catalina.bat

set _EXECJAVA=%_RUNJAVA%
set MAINCLASS=org.apache.catalina.startup.Bootstrap
set ACTION=start
set SECURITY_POLICY_FILE=
set DEBUG_OPTS=
set JPDA=
set JAVA_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=9999,suspend=n,server=y

引用

你可能感兴趣的:(java,jvm,tomcat,socket,Security)