NonStop Server for Java Programmer's Reference (NSJ 4.2+)
JDI specification does not provide in-process debugging. Hence, a Java based tool called a debugger is used to
debug another JVM running the Java application. This JVM, called the debuggee, also contains the back-end of the
debugger that is responsible to accept the request from the front-end of the debugger and to respond to these
requests.
NonStop Server for Java 4 ships a terminal oriented non-GUI debugging tool. This Java Debugger Tool (JDB) can
be used on a NonStop Kernel system platform to debug the Java applications running on the same NonStop Kernel
system or on another NonStop Kernel system or any other platform.
You can also use the non-GUI debugging jdb and other vendors' GUI debuggers running on Microsoft Windows
and other platforms to debug NonStop Server for Java 4 applications running on a NonStop Kernel system.
Note: However, these tools must use the standard Java Debug Interface (JDI) as documented in the
JDPA specification for SDK 1.3.1. JPDA enhancements for the Java 1.4 family have not been tested
with the current implementation of NonStop Server for Java 4.
Transports
A JPDA transport is a form of inter-process communication used by a debugger application and the debuggee.
NonStop Server for Java 4 provides a socket transport that uses the standard TCP/IP sockets to communicate
between debugger and the debuggee.
NonStop Server for Java 4 defaults to socket transport. NonStop Server for Java 4 does not support shared memory
transport.
java Command-Line Options to Run a Debuggee
For remote debugging, you need to start the Java application to be debugged (debuggee) as a server using the
following command:
java -Xdebug -Xnoagent
-Xrunjdwp:transport=dt_socket,server=y,address=port_no,suspend=y classname
arguments
-Xdebug
Enables debugging.
-Xnoagent
Disables the old Sun.tools.debug agent. This is the default.
-Xrunjdwp:sub-options
sub-options are specified in the following format:
name1[=value1],name2.=[=value2]...
The sub-options are:
transport
Name of the transport to use. DT_socket is the value for this option. NonStop Server for
Java 4 defaults to DT_socket.
server=y
y means listen for a debugger application
address=transport-address-for-this-connection
The transport address is the port number in which the debuggee is listening on for the debugger.
suspend=y