The Java Debugging Environment

To use the JPDA debugging architecture, you must do the following. These instructions are general: how you actually set up the debugger depends on your system.

To use the Java Debugging Environment (JDB):

  1. Download and install a copy of JPDA.

  2. Set the path for your system.

    Suppose you install JPDA in C:\jpda. Set your PATH environment variable to include C:\jpda\bin.

  3. Set the path for the application server.

    For the application server, set the Domain Settings/Add to PATH to include C:\jpda\bin.

  4. Set the JavaVM Options.

    Set the JavaVM Options to be something like the following (see the JPDA documentation for a more complete example):

    -Xdebug -Djava.compiler=NONE -Xnoagent -Xrunjdwp:transport=dt_socket,suspend=n,address=8765,server=y
  5. Run the debugger.

    After starting the tools session and causing it to start the JVM, you can use the JDB command line debugger that comes with JPDA, using a command like the following:

    jdb -connect com.sun.jdi.SocketAttach:port=8765

    You can also use the (no cost) Forte for Java Community Edition IDE from Oracle or any of the Java IDEs noted on the JPDA pages.