Starting tomcat in debug mode – Linux
To start tomcat in debug mode, you need to set JPDA_TRANSPORT=dt_socket and JPDA_ADDRESS=9000 environment variable. To set these variable for a session only, open command prompt and run following commands
export CATALINA_HOME=/home/xyz/opt/tomcat export JPDA_TRANSPORT=dt_socket export JPDA_ADDRESS=9000
now start tomcat using following command
$ %CATALINA_HOME%/bin/catalina.sh jpda start
Setting this variable in your personal ~/.bashrc file has the advantage that it will always be set (for you, as a user) each time you log in or reboot the system. To do so, open ~/.bashrc in a text editor (or create the file if it doesn’t already exist) and insert the following line anywhere in the file
export CATALINA_HOME=/home/xyz/opt/tomcat export JPDA_TRANSPORT=dt_socket export JPDA_ADDRESS=9000
Save and close .bashrc.
You must logout and login again to make your change take effect. or source your .bashrc file to make your change take effect for the current session
$ source ~/.bashrc
Related Post
Comments
Leave a Reply