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.
-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.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.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.
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.
C:
) and use backslash (\) as the
file separator.java.lang.Object
, and is not the name of the
source file or the bytecode file (.class
).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.