next up previous contents
Next: Start an EE under Up: EE Debugging Previous: EE Debugging   Contents

Start a Java EE under jdb

To start a Java EE under jdb, use the G=java option on the Anetd LOAD command. Depending on the version of the JDK used, the remote JVM will display a line of the form
Agent password=<passwd>
or
Listening for transport dt_socket at address: <port>
This output is captured by Anetd and returned to the client. The client user must then use this information to connect a local JDB process to the remote JVMe.

Example 3.19
Assuming that remote.host.domain is running Anetd with remote debugging enabled, the following commands might be used to establish a remote Java debugging session:
[local]% sc remote.host.domain LOAD J=http://bro.isi.edu/ASP/~asp/AspMain
         T=15 S=-d0 S=-17 O=output R=error C=ASP_EE V=jdk1.1.8 G=java
Agent password=3upmuk

[local]% jdb -host remote.host.domain -password 3upmuk
or, with a more recent JDK:
[local]% sc remote.host.domain LOAD J=http://bro.isi.edu/ASP/~asp/AspMain
         T=15 S=-d0 S=-17 O=output R=error C=ASP_EE V=jdk1.2.2 G=java
Listening for transport dt_socket at address: 1742

[local]% jdb -attach remote.host.domain:1742



Steven Dawson 2001-08-30