Debug Java programs by using the *DEBUG option

Use the *DEBUG option to view the source code before running the program. The *DEBUG option allows you to set breakpoints within the code.

To use the *DEBUG option, enter the Run Java™ (RUNJVA) command that is followed by the name of your classfile and OPTION(*DEBUG) on the command line. For example, the iSeries™ command line should look like this:

RUNJVA CLASS(classname) OPTION(*DEBUG)
Note: If you are not authorized to use the Start Service Job (STRSRVJOB) command, OPTION(*DEBUG) is ignored.

To view the debugging displays, see Initial debugging displays for Java programs.

The easiest way to debug Java programs that run on your iSeries server is to use the IBM® iSeries System Debugger. The IBM iSeries System Debugger provides a graphical user interface that enables you to more easily use the debugging capabilities of your iSeries server.

For more information about using the iSeries System Debugger to debug and test Java programs that run on your iSeries server, see IBM iSeries System Debugger.