Release notes for the jdb debugger |
As a demonstration of the JDI, we are providing source code for the jdb debugger, re-written to use the JDI. It contains a few features not found in the standard jdb, including some expression evaluation, but some features of the standard jdb have not been implemented.
jdb man pages for Windows
jdb <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.
On Windows platforms the executable bin/jdb.exe
,
finds the Java Runtime Environment through
the Windows registry. If you installed the 1.2 J2SDK or JRE with the standard
installation program, this value should be set correctly for you. If not,
you'll need to create/edit the registry entry at
HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Runtime Environment/1.2/JavaHome
containing the name of your JRE directory.
On Solaris platforms the executable bin/jdb
,
finds the Java Runtime Environment through
the PATH. The JRE corresponding to the first instance of "java" on the path
is the one used.
In addition, jdb can be started by running the 1.2 java VM
interpreter of your choice with the class
com.sun.tools.example.debug.tty.TTY
. Make sure that the
jpda.jar file is on the classpath.
For more information on invoking and connecting see Connection and Invocation Details, particularly the section on jdb.
examples/examples.jar
. Note: this also includes the
source for javadt
.
Source code of these example application 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.
Code for jdb is in the directories:
src/share/classes/com/sun/tools/example/debug/tty
src/share/classes/com/sun/tools/example/debug/expr
examples/examples.jar
, you need only to compile them. No special
options are required, aside from those which set your classpath to
include the com.sun.jdi library found in lib/jpda.jar
.
However, if want to modify the expression parser in the file
Expr.jj
, you will need the
JavaCC parser generator
version 0.7.1.
It is available free from
SunTest.