The Java Debugger
The Java™ Debugger (JDB) is included in the SDK. The debugger is started with the jdb command; it attaches to the JVM using JPDA.
Note: The Java Virtual Machine Debugging Interface (JVMDI) is
not supported in this release. It has been replaced by the Java Virtual Machine Tool Interface (JVMTI).
The jdb command is not available on the z/TPF system. Therefore, you must
debug any Java application that runs on the z/TPF system from
a remote workstation that is installed with IBM® SDK, Java Technology Edition, Version 8. You can install this product
by using one of the following methods:
- A stand-alone Java installation
- An integrated development environment (IDE) that issues JDB commands behind the scenes, such as the IBM TPF Toolkit
For more information about JDB options, on a remote workstation type:
jdb -helpFor more information about JDB commands, complete the following
steps on a remote workstation:- Type
jdb. - At the jdb prompt, type
help.
To use JDB to debug Java applications that are running on
remote workstations, JPDA uses a TCP/IP socket to connect to the remote JVM.
- Start the JVM on the z/TPF system. Add appropriate options based on whether you are using a
class or JAR file. For
example:
The JVM starts up, but suspends execution before it starts the Java application.java -agentlib:jdwp=transport=dt_socket,server=y,address=<port> <class> java -agentlib:jdwp=transport=dt_socket,server=y,address=<port> -jar <jar> - On a remote workstation, attach the debugger to the remote JVM:
- On Windows
systems:
jdb -connect com.sun.jdi.SocketAttach:hostname=<host>,port=<port> - On other
systems:
jdb -attach <host>:<port>
- On Windows
systems:
- For more information about JDB and JPDA and their usage, see: