NonStop Server for Java 4.2 Tools Reference

-X option
Sets a nonstandard target VM option.
Connecting for Remote Debugging
The Debugger launches the target Java VM.
-launch
jdb -launch ClassName
i.
The Debugger attaches to a previously running Java VM.
-attach
jdb -attach hostname:portnum
For this command, the JVM must already be running as a server at <hostname:portnum>
To start the server, use the following command :
java -Xnoagent -Xdebug -Djava.complier=NONE \
-Xrunjdwp:transport=dt_socket,\
address=hostname:portnum,server=y ClassName
Note: If address option is not given, the server will start on any available port on the
local host and print portnum. This portnum should be used by the jdb to attach.
ii.
The target JVM attaches to previously running debugger.
-listen
jdb -listen hostname:portnum
To attach a target JVM, use the following command :
java -Xnoagent -Xdebug -Djava.complier=NONE \
-Xrunjdwp:transport=dt_socket,\
address=hostname:portnum ClassName
Note: You must give the address parameter because the debugger listens at this
address.
iii.
The Debugger selects a connector.
-connect
jdb -connect option
Note: Only the com.sun.jdi.SocketListen option is supported.
The target Java VM can then attach as:
iv.