Sun's complete JPDA connection reference manual can be accessed online at http://java.sun.com/products/jpda/doc/conninv.html. What follows is a summary of the various JPDA command-line options that are available to you when you are starting your remote process and wish to have establish a debug connection between this process and BugSeeker. If you are having trouble starting your process from the command-line, consult this section as well as the JPDA section of the Troubleshooting chapter at the end of this guide.
If the HotSpot performance engine is installed on your system or if you are using one of the newer SDK 1.3 that come with HotSpot included, you will also need to supply the -classic option to use the classic VM which is much faster than HotSpot when run in debug mode. If you do need to use the -classic option, it must appear first before all other JVM options.
Whenever you are launching your process remotely, the following Virtual Machine options must be supplied: -Xdebug -Xnoagent -Djava.compiler=NONE.
The -Xdebug option
enables debugging.
The -Xnoagent option disables the old debug mode that is not used
by BugSeeker.
The -Djava.compiler=NONE option disables the JIT compiler.
The JPDA options are supplied as part of the -Xrunjdwp option string. The exact -Xrunjdwp option string you will be supplying depends on the transport type you will be using, the address that you will be connect to or listen for connections on, and whether you wish to run this remote VM as a JPDA server or client. For a definition of what is a JPDA server and a JPDA client, please consult the Remote Debugging section.
To quickly display the available JPDA options that the -Xrunjdwp option accepts, run the following command "java -Xrunjdwp:help" and a short description of all acceptable JPDA sub options will be displayed on the console.
-Xrunjdwp Examples
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
Listen for a socket connection on port 8000 (hostname will be machine you started this VM from). Suspend this VM before main class loads (suspend=y). This VM will wait for BugSeeker to connect to this address (Debug | Remote | Attach).
-Xrunjdwp:transport=dt_shmem,server=y,suspend=n
Choose any available shared memory transport address and print this address to console when VM starts. VM will be acting as a server (server=y) so it will allow BugSeeker to attach to this address (Debug | Remote | Attach). However, the VM will begin executing immediately (suspend=n). Whenever you use dt_shmem transport type, BugSeeker and remote started VM must be run on the same machine.
-Xrunjdwp:transport=dt_shmem,server=y,address=mysharedmemory,suspend=y
Listen for a shared memory connection at shared address named mysharedmemory. VM will be suspended before the main class loads (suspend=y). This VM will wait for BugSeeker to connect to this shared memory address (Debug | Remote | Attach).
-Xrunjdwp:transport=dt_socket,server=n,suspend=y,address=calixta:6000
Connect this remote VM to BugSeeker which should already be listening on port 6000 running on a machine whose hostname is calixta (Debug | Remote | Listen). This VM will be connecting to BugSeeker (server=n) using socket transport which allows this VM to be started on a different machine than the one BugSeeker is running from. When a debug connection is established, the session will be initially paused (suspend=y).
-Xrunjdwp:transport=dt_shmem,server=n,suspend=y,address=superman
Connect this VM to BugSeeker which should already be listening at shared memory address named "superman" (Debug | Remote | Listen). BugSeeker and this VM must be run from the same machine. This VM will be connecting to BugSeeker (server=n) using shared memory transport type. When a debug connection is established, the session will be initially paused (suspend=y).