Bug 44988 - JPDA_OPTS in catalina.sh / catalina.bat is using old JDWP semantics
Summary: JPDA_OPTS in catalina.sh / catalina.bat is using old JDWP semantics
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Native:Integration (show other bugs)
Version: 6.0.16
Hardware: All All
: P4 minor (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
URL:
Keywords: JDK1.5
Depends on:
Blocks:
 
Reported: 2008-05-13 06:10 UTC by Cédrik LIME
Modified: 2009-03-03 14:23 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cédrik LIME 2008-05-13 06:10:34 UTC
Since Java 5, the recommended option to start a JVM in debug mode has changed from
-Xdebug -Xrunjdwp:...
to
-agentlib:jdwp=...
as described in http://java.sun.com/j2se/1.5.0/docs/guide/jpda/conninv.html#Invocation

Since Tomcat 6 requires Java 5, this change should be propagated in catalina.sh (line 212) / catalina.bat (line 152):
change "JPDA_OPTS=-Xdebug -Xrunjdwp:" to "JPDA_OPTS=-agentlib:jdwp="

Note that this change should not be back-ported to Tomcat 5.x, since this version runs with Java 1.4.
Comment 1 Mark Thomas 2008-05-13 13:15:33 UTC
Thanks for the patch.

I have applied it to trunk and proposed it for 6.0.x
Comment 2 Mark Thomas 2008-05-15 14:04:35 UTC
Thanks again for the patch. It has been applied to 6.0.x and will be in 6.0.17 onwards.
Comment 3 Cédrik LIME 2009-03-03 02:28:44 UTC
In addition to the changes described in the description (and successfully applied), we also need to keep the documentation of the impacted files in sync with code.

Please change "-Xdebug -Xrunjdwp:" to "-agentlib:jdwp="
in catalina.sh (line 60) / catalina.bat (line 64)

Trunk and Tomcat 6.x only!
Comment 4 Mark Thomas 2009-03-03 14:23:27 UTC
Thanks for the catch. Fixed in trunk and 6.0.x
Will be in 6.0.19 onwards.