Java Development Kit
A debugger for the Java(tm) Programming Language needs four features:
This API defines a RemoteDebugger class which serves as a viewer for the Java Language Runtime being debugged. This class's methods perform general operations, such as returning arrays of RemoteClass or RemoteThread. More specific operations are supported through the methods of these classes. To get a class's methods, for example, the RemoteClass method getMethod() would be used. To print one of those methods' names, use its getName() method.
The jdb tool serves both as a "proof of concept" for the Java Debugger API, and as a useful debugging tool in its own right. The jdb tool is available for Solaris and Windows. The TTY class implements a dbx-like debugger which supports browsing of objects written in the Java Programming Language as well as basic debugging. Tools developers are strongly encouraged to come up with something more user-friendly. <grin>
The debugger communicates with the java interpreter being debugged via a socket-based, proprietary protocol. This protocol is neither public nor extensible by debugging clients, primarily for security reasons.
The Java Language Runtime can only be debugged if started with the "-debug" flag. When started this way, the interpreter prints out a password to be used by the debugger, and begins listening on a dynamically allocated port. The debugger must specify the correct host and password when creating the RemoteDebugger instance.
Only one debugger may be connected to a Java interpreter in debug mode.
Java Development Kit![]()