Tools: Debugging Native and Java Code with WDB

Page 9
Tools for
Debugging
© 2001 Hewlett-Packard Company
gdb: Start-up
Four Methods for Debugging Java
Four methods:
1. Modify application launch script’s java command
+ Often the easiest approach – uses DEBUG_PROG
2. Modify the /opt/java1.3/bin/.java_wrapper script
+ Easy to pass command line arguments
Need to have special JDK if many java processes
3. Use built-in DEBUG_PROG environment variable
+ Easy to set for the process
Hard to pass in large numbers of command line
arguments
4. Attach to a running Java program
+ Easy to do