JDK-6210758 : Doccument the ability to debug Java Webstart applications
  • Type: Enhancement
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 1.0.1,1.4.2,5.0,6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,windows_xp
  • CPU: generic,x86
  • Submitted: 2004-12-20
  • Updated: 2010-08-06
  • Resolved: 2006-04-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b77Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
A DESCRIPTION OF THE REQUEST :
We need to document how one can run a Java Webstart application in debug mode. We need the ability to attach a jpda debug session and/or jconsole to monitor the application's execution.

I believe this capability already exists (by passing a certain sequence of arguments to javaw.exe instead of javaws.exe), but it isn't publically documented and no one has gotten it to work 100% on the discussion forums.

JUSTIFICATION :
I have run into many bugs that only occur while running under Webstart. It is extremely difficult to fix them without the ability to use conventional debugging tools.
###@###.### 2004-12-20 19:01:33 GMT

Comments
EVALUATION Two documents have now been posted which address debugging Web Start applications. updated faq: http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/faq.html#602 and netbeans javaws plugin: http://www.netbeans.org/kb/articles/matisse-jaws.html so am marking this as delivered (about the time of b77)
07-04-2006

EVALUATION - There are a number of improvements in Mustang that should be reviewed when updating the documentation: 1. The JDK includes a new AttachingConnector named "com.sun.jdi.ProcessAttach" which allows the debugger to attach by process-id rather than transport address. This means that the debug can be started without specifying a transport endpoint - eg: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n". The debugger can then connect using something like "jdb -connect com.sun.jdi.ProcessAttach:pid=<pid>". 2. jconsole no longer requires the target VM to start with -Dcom.sun.management.jmxremote or other command line options. Instead just start jconsole and let the user select the JWS application from the list. If the target VM was not started with the JMX agent then jconsole start it automatically in the target VM before connecting.
03-01-2006

EVALUATION The existing jpda code is not turned on by the makefiles. several changes need to be made to it (see comments) to enable debugging using jpda or jconsole. ###@###.### 2005-1-06 17:04:43 GMT given the proposal to remove java_g as a build target, we should develop specific debugger friendly options to javaws, that work in all builds. this should be part of the clean-up of launcher.c. The current jpda specific code should all be either enabled or removed. ###@###.### 2005-2-06 16:05:05 GMT finally any -XDebug option to Java Web Start needs to replace the environmen variable "JAVAWS_TRACE_NATICE", and expand the ability to trace problems in the native code. ###@###.### 2005-2-21 16:49:49 GMT in re-writing the launcher.c code, the new command line arg "-XArg <vm arg>" was added. This does the same thing as the env variable. Args passed to the vm in this way will be also passed thru to the next VM in a multi-launch situation. All that remains to be done for mustang is to try out and doccument for netbeans. ###@###.### 2005-04-27 19:45:22 GMT
06-01-2005