Starting a Local Debuggee

See Also

Launching a new debuggee is performed by way of the launch dialog. This dialog prompts you for several pieces of information, most of which will have default values if the fields are left blank.

You can open the dialog box by choosing Session > Start.

Paramaters

Java Runtime
Use the combo box to choose the runtime to launch the debuggee. If the list is empty, click on the "..." button next to the list to define a runtime. In most cases a default runtime will be automatically discovered and added to the list.
JVM Arguments
These are options to the debuggee JVM, such as -X.., -hotspot, -ea, -jar .., and -D... When using the -jar option, you should put the name of the jar file in the Class Name field.
Class Name
This is the name of the class to be debugged, and this class must define a public static void main(String[] args) method in order for the debuggee JVM to start correctly. This is typically the bootstrap class in your application. This field can have the name of a JAR file instead of a class, in which case the JAR file must have the Main-Class property set in the manifest.
Class Arguments
These are the arguments to be passed to your main class. These are the same as the arguments that come after your main class name when launching your program from the command line.
Resume immediately
Checking this option causes the debuggee to start execution as soon as the JVM has completed its startup process. Unchecked, the debuggee will wait for you to instruct it to resume.

Classpath

Use the path editor to define the classpath for your application. Add each of the .jar, .zip, and directories that your application needs via the Add button. You can add arbitrary values by simply typing them into the file selector dialog's input field.

What to do next

After pressing the Launch button in the launch dialog, the new debuggee process will start in a few seconds. The debuggee JVM then invokes the main method of the class named in the "Class Name" field. At this point you are ready to begin debugging by setting breakpoints and stepping through your code.

Troubleshooting

Class not found

Is the classpath set correctly?
On Microsoft Windows you need to include the drive specification (e.g. C:) and use backslash (\) as the file separator.
Did you enter a proper class name?
Note that a class name is of the form java.lang.Object, and is not the name of the source file or the bytecode file (.class).
Is the name of the class fully-qualified?
If your class is defined in a package, you need to include that as part of the class name (e.g. java.lang.Object). Be sure not to include the .class extension of the class file. The class name refers to the name of the class, not the name of the file in which it is stored.

See Also


Legal Notices