JDB - Syntax



This chapter explains the syntax of JDB command. The syntax contains four sections listed as follows:

  • JDB
  • option
  • class
  • arguments

Syntax

The syntax of JDB is as follows.

jdb [ options ] [ class ] [ arguments ]

JDB

It calls jdb.exe from the Java Development Kit.

Options

These include the command line options used to debug a Java program in an efficient way. The JDB launcher accepts all the options (such as -D, -classpath, and -X) and some additional advanced options such as (-attach, -listen, -launch, etc.).

Class

It is the class name on which you want to perform debugging operations.

Arguments

These are the input values given to a program at runtime. For example, arg[0], arg[1] to the main() method.

In the above four segments, options is the most important one.

Advertisements