Programmer's Guide > Using the AOM > Using Java to Access the AOM > Debugging Java Applications > The Socket Method
  
The Socket Method
The ACL set javadebugport option specifies the socket port you want to use for debugging. If javadebugport is set to auto, the Arbortext Publishing Engine and Arbortext Editor will randomly select an unused socket port.
As an example, if you want to debug the EventFlow class, and it is located in the directory C:\temp, use the following steps.
1. From the Arbortext Editor command line, enter the following commands:
set javaclasspath=C:\temp
set javadebugport=auto
java_console() # this loads the JVM
eval option('javadebugport')
Note the port number displayed in the eval window. For purposes of this example, assume this number was 3539,
2. Open a shell window, navigate to the directory where your Java source resides, and enter the following command:
jdb -connect com.sun.jdi.SocketAttach:port=3539
3. After JDB is initialized, give it a break point. For example, to break at the method flow of the class EventFlow, enter the following:
> stop in EventFlow.flow
4. From the Arbortext Editor command line, run EventFlow.flow as follows:
java_static('EventFlow','flow')
JDB will stop at the break point and display the line of the source code where it stopped.