Debugging Java programs on IBM i

You have several options for debugging and troubleshooting Java™ programs that run on your system, including IBM® i Debugger, the system interactive display, Java Debug Wire Protocol-enabled debuggers, and Heap Analysis Tools for Java.

The following information is not a comprehensive assessment of the possibilities, but does list several options.

One of the easiest ways to debug Java programs that run on your system is to use the IBM i Debugger. The IBM i Debugger provides a graphical user interface (GUI) that enables you to more easily use the debugging capabilities of your server. You can use the interactive display of your server to debug Java programs, although the IBM i Debugger provides a more easily usable GUI that enables you to perform the same functions.

Additionally, the IBM i Java virtual machine (JVM) supports the Java Debug Wire Protocol (JDWP), which is part of the Java Platform Debugger Architecture. JDWP-enabled debuggers allow you to perform remote debugging from clients that run different operating systems. (The IBM i Debugger also enables you to perform remote debugging in a similar way, although it does not use JDWP.) One such JDWP-enabled program is the Java debugger in the Eclipse project universal tool platform.

If the performance of your program degrades as it runs for a longer period of time, you may have inadvertently coded a memory leak. To help you debug your program and locate memory leaks, see Finding memory leaks.