Java Platform Debugger Architecture

As a demonstration of the Java Debug Interface (JDI), we are providing source code for the jdb debugger.

jdb man pages

jdb man pages for Windows

jdb man pages for Solaris, Linux, or Mac OS X

Invoking jdb

The jdb sample can be run by executing:

   java tty.TTY <options>.. <class-name>
where <class-name> is the name you would normally place on the java command line. The -help option provides information on options. Note: Be sure that the lib/tools.jar file is on the class path used to invoke tty.TTY. (The tools.jar file includes the JDI Library.) The compiled jdb class files must also be on the class path.

For more information on invoking and connecting see Connection and Invocation Details, and particularly the section on jdb.

Source for jdb

Full source code for jdb is included as part of the example code in the Java SE demo package that you can download from the Java SE Downloads page. The lib/jpda directory is included in examples.jar. (Use jar xvf examples.jar to extract the contents of examples.jar.) Note: this file also includes the source for javadt. Source code of these example applications is included to provide concrete examples for debugger developers. Example code may be used, modified and redistributed by debugger developers providing they adhere to the terms in the copyright notice.

jdb uses the following packages (found in the examples.jar file):

Application code
Expression processing code

Building jdb

To completely rebuild the jdb classes from the provided source files, you need only to compile them. No special options are required, aside from those which set your classpath to include the JDI Library. However, if want to modify the expression parser in the file Expr.jj, you will need the JavaCC Parser Generator.

Copyright © 1993, 2020, Oracle and/or its affiliates. All rights reserved.