To use the interactive display of your server to debug a class
loaded through a custom class loader, complete the following steps.
- Set the DEBUGSOURCEPATH environment variable to the directory containing
the source code, or in the case of a package-qualified class, the starting
directory of the package names.
For example, if the custom class
loader loads classes located under the directory /MYDIR, perform the following:
ADDENVVAR ENVVAR(DEBUGSOURCEPATH) VALUE('/MYDIR')
- Add the class to the debug view from the Display Module Source
screen.
If the class has already been loaded into the Java™ virtual
machine (JVM), just add the *CLASS as usual and display the source code to
debug.
For example, to view the source for pkg1/test14.class, enter
the following:
Opt Program/module Library Type
1 pkg1.test14_ *LIBL *CLASS
If the
class has not been loaded into the JVM, perform the same steps to add the
*CLASS as previously indicated. The Java class file not available message
then displays. At this point, you may resume program processing. The JVM automatically
stops when any method of the class matching the given name is entered. The
source code for the class is displayed and can be debugged.