To include debug information, compile Java code with javac -g command for Java 1.1.x. For the Java 2 platform use the javac -g:lines,vars,source command.
After starting OLT, use one of the following commands to start the Java client application:
java
-Dcom.ibm.CORBA.BootstrapHost=<BootstrapHostname>
-Dcom.ibm.CORBA.EnableApplicationOLT=true
-Dcom.ibm.CORBA.OLTApplicationHost=<OLT_Server_Host>
-Dcom.ibm.CORBA.OLTApplicationPort=<OLT_Server_Port>
-DOLTClient=true
AppNamewhere:
- <BootstrapHostname> = your fully-qualified server application host name (only needed if System Manager is running on a different host). Applicable only for WebSphere Application Server, Enterprise Edition.
- <OLT_Server_Host> = the fully qualified name or TCP/IP address of the machine running your OLT server
- <OLT_Server_Port> = the port where the OLT server listens for connecting OLT clients (default 2102)
- AppName is the fully qualified path to your program
Use the command appropriate for the level of the JDK of the client application.
Use the command appropriate for the level of the JDK of the client application.
Start OLT. On the machine where you want to run the Debugger user interface, start the Debugger daemon with the following command:
idebug -qdaemon -quiport=<ui_daemon_port>
On the machine where the client of your debuggee application is supposed to run, issue the command that starts the Debugger engine. This command must be appropriate for the level of the JDK of the client application.
To trace VisualAge Java clients outside of a WebSphere or Component Broker environment, set the following OLT properties inside the code. You also need to set these properties if you want to trace a Java business object calling another Java business object through the Java orb (as opposed to the C++ orb):
java.util.Properties props = new java.util.Properties();
props.put("com.ibm.CORBA.requestTimeout","0");
props.put("OLTClient","true");
props.put("com.ibm.CORBA.EnableApplicationOLT","true");
props.put("com.ibm.CORBA.OLTApplicationHost","<OLT_Server_Host>");
props.put("com.ibm.CORBA.OLTApplicationPort","<OLT_Server_Port>");
props.put("com.ibm.CORBA.BootstrapHost","<BootstrapHostname>");
System.out.println("1) About to call ORB.init passing Bootstrap information passed in on command line");
orb = ORB.init (args, props);
Add the file dertrjrt.jar to your classpath.
If you are using the VisualAge Java IDE debugger, you can trace and debug with OLT, but please note the following limitations:
If you encounter memory errors when starting a Java client application, modify the start command to include memory management options that specify settings pertaining to the JVM of the client application. Add the string -mx75m -ms30m -oss75m to the Java command arguments, immediately preceding the name of your application.
If the out-of-memory errors reoccur, try increasing the -mx value.