Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Starting Tomcat using jsvc and jpda

807603Feb 3 2008 — edited Feb 3 2008
This is mostly just a message for anyone else looking for an answer to how to start Tomcat as a daemon with webapp remote debugging enabled.

There is a real lack of information on how jsvc works when starting Tomcat under *nix. I'm using Solaris 10, but this should be very similar on most Linux systems.

There is a simple shell script called tomcat in /etc/init.d that starts the cat as a daemon. The change needed to use remote debugging from Eclipse is to enable jpda. This is done by setting the CATALINA_OPTS to include the jpda settings.

Here's the modified line in the script:
CATALINA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
If it worked you will see a line like "Listening for transport dt_socket at address: 8000" in your catalina.out. And now Eclipse can do remote debugging on port 8000.

If you use the catalina.sh script to start the cat all you need is
./catalina.sh jpda start
since it defaults to these settings, that's where I found them.

And of course there are dukes for suggestions.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 2 2008
Added on Feb 3 2008
0 comments
451 views