set javadebugport
set javadebugport= { off | auto | n}
When Arbortext Editor loads the Java Virtual Machine (JVM), it checks the value of the set javadebugport option. If set javadebugport is set to a positive number, Arbortext Editor turns on the JVM debug mode and establishes communication with Java debuggers by using the socket port number specified by set javadebugport . If set javadebugport is set to auto, Arbortext Editor randomly selects an unused socket port number, sets set javadebugport to the selected port number, and performs the remaining tasks for establishing communication. If the set javadebugport is set to off (the default), Arbortext Editor will not turn on the JVM debug mode.
|
If you set set javadebugport to on or auto, you must include the Java Development Kit (JDK) bin directory in your PATH environment variable. If you do not add the JDK bin directory to your PATH environment variable, Arbortext Editor will terminate when it invokes the JVM.
|
To establish communication between the Java debugger and Arbortext Editor, pass the socket port number to the Java debugger. For example, if the set javadebugport is set to 3539 and the jdb (Java debugger) is running on the same machine as Arbortext Editor, issue the following command:
c:\> jdb -connect com.sun.jdi.SocketAttach:port=3539
Refer to Sun Java documentation on
jdb — The Java debugger for information on the
jdb command and its options, which is available from the
java.sun.com web site.
The setting for javadebugport is only evaluated when the first java_type function is called in a Arbortext Editor session. Subsequent changes to set javadebugport will not affect the running Java Virtual Machine unless you exit Arbortext Editor and start a new session. Consequently, when using the java_type functions, you should set javadebugport before invoking a java_type function.
Example:
set javadebugport=auto
# Load the JVM
java_console()
# Get the socket port number for Java debugging
eval option('javadebugport')
If set javadebugport is used with Arbortext Publishing Engine, you should protect it from being sourced again after the JVM has started. Put the set javadebugport statement inside an appropriate if statement. For example:
# Try to change this value only if the JVM has not started yet.
# This protects from failure in case this file is sourced again
# after the JVM has already started.
if (!java_init()) {
set javadebugport=8090
}
Related Topics