一、在widnow的tomcat下,找到{tomcat}\bin目錄下的catalina.bat中設置linux
set DEBUG_OPTS= -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=ntomcat
在linux的tomcat下,找到{tomcat}\bin目錄下的startup.sh中設置socket
替換 exec "$PRGDIR"/"$EXECUTABLE" start "$@" 爲 exec "$PRGDIR"/"$EXECUTABLE" jpda start "$@" spa
二、在window的jboss下,找到{jboss}\bin目錄下的run.bat中設置debug
set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n %JAVA_OPTS%server
在linux的jboss下,找到{jboss}\bin目錄下的run.conf中設置class
將 #JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"bug
去掉前面的「#」co