You can attach source to a JAR file or variable to enable source-level stepping and browsing of classes contained in a binary JAR file.
JAR File
In the Attachments dialog, you can associate the JAR file with another archive (either a JAR or a ZIP file).
-
In the
Archive
field, type or browse to select a file or directory containing source code for the JAR file.
-
In the
Root Path
field, type or browse to select the prefix path to the source code stored inside the archive. If you click
Browse, you can browse the contents of the JAR and to select its root. Specifying the proper root path is critical to locating the source for a type. A common prefix is
src. For example, when the Java development tools are looking for the source for
java.lang.Object, they would try to locate
src/java/lang/Object.java.
Note: In this example,
src
is the prefix.
Variable
In the Attachments dialog, you can associate the variable with another archive (either a JAR or a ZIP file).
-
In the
Archive Variable Path
field, define the location of the archive relative to a variable (e.g.,
MYVARIABLE/src.jar
). Use either the
Variable
button to select an existing variable or the
Browse
button to select the relative path.
-
In the
Root Variable Path
field, enter a variable that stores the root path prefix of the JAR file. Use either the
Variable
button to select an existing variable or the
Browse
button to browse the archive referenced by the variable.
Note: When attaching source for a variable entry, both the path to the
Archive
and the
Root Path
must be defined by variables.