NonStop Server for Java 6.0 Programmer's Reference

run -debug java java_options
To debug native code, load the DLL first. Visual Inspect lets you stop the program after the DLL is
loaded so you can set breakpoints.
You can see and debug only the native routine to be debugged and other native routines that
routine calls. All other scopes above the native routine are compiled or interpreted Java code,
which the inspect debugger has no knowledge about.
Using Visual Inspect To Add an Event Breakpoint on DLL Open Event
Because Visual Inspect does not support deferred breakpoints, you need to ensure that a DLL is
loaded before setting a breakpoint. Visual Inspect supports the DLL Open event breakpoint that
suspends the program just after a DLL is loaded but before initialization routines are invoked.
To add an Event Breakpoint on DLL Open event:
1. In Visual Inspect, choose View —> Breakpoints in Application or Program Control view.
2. Click the Event tab.
3. Click Add Breakpoint and select DLL Open from Event Name drop-down menu.
4. Click OK .
Debugging Java and JNI Code
You can use the Native Inspect debugger tool to debug the native code and the Java Debugger
tool to debug the Java code at the same time. You need to start the Java debuggee process under
a debugger. For example, type the following command.
run -debug java -Xdebug -Xnoagent -Xrunjdwp:sub-options
Then, you can use the Java Debugger tool to communicate with the debuggee process as explained
under Debugging Overview“Debugging Overview” (page 54).
Deviations in JVM Specification Options
The compiler specification options for both the java and jdb tools deviate from standard Java
because NonStop Server for Java 6.0 implements only the HotSpot server VM and does not
implement a client VM. Accordingly, the options that specify running the client VM are not valid.
java: Java Application Launcher Command Line Option Deviations
-client
Selects the Java HotSpot Client virtual machine (VM).
NOTE: The -client option is not valid with NonStop Server for Java 6.0.
-server
Selects the Java HotSpot Server virtual machine (VM).
NOTE: -server the default option for NonStop Server for Java 6.0; therefore,
specifying -server is optional.
For more information about the java tool and additional deviations from standard Java, see
“Implementation of Garbage Collector Types (page 61) and java in the NonStop Java Tools
Reference Pages.
jdb: Java Debugger Command Line Option Deviations
-tclient
Runs the application in the Java HotSpot client VM.
58 Implementation Specifics