You cannot currently debug a Java driver on NetWare or Unix systems. For the Windows platform (NT or 2000), the following debug interfaces and debuggers are available:
To use a debug agent, you must install the debug agent and then enable it. Complete the following steps.
Obtain a copy of JDK 1.3.0.
Make a backup copy of the DirXML jre directory (default location—C:\novell\nds\jre).
Delete the DirXML jre directory.
Copy the jre directory from the JDK into the DirXML jre directory.
Copy the contents of the jdk/lib directory (includes tools.jar) into the DirXML jre/lib directory.
Add the DirXML-JavaDebugPort attribute to the DirXML-DriverSet object.
From ConsoleOne, right click on the DirXML-DriverSet object and select the Properties option.
Select the Other tab.
Press the Add button and select the DirXML-JavaDebugPort attribute.
Set the value to some TCP port not in use on your machine (8080 usually works).
Press the OK button.
Restart eDirectory.
Before the first driver starts, a small dialog will pop up with the debugger password. At this point, you can choose to attach a debugger to the JVM and press OK.
Sometimes you can attach a debugger after you have dismissed the dialog that pauses for you to attach to the JVM; sometimes you can’t.
To use a JPDA type debugger, you must set options for the JVM using a DirXML environment variable: DHOST_JVM_OPTIONS. Java 2 options are set using this environment variable and passed to the JVM by DirXML.
For more information on the environment variables, see JVM Variables. For information on the JVM options and JPDA see Java Platform Debugger Architecture.
The Visual Cafe debugger is an agent-type debugger.To set up a debug session, complete the following steps.
Create a project for debugging.
Set the main class to “sun.tools.agent.EmptyApp”.
Set your source directories and input class files directories appropriately for your environment.
Attach the debugger using Projects | Debug in Waiting VM. Use “localhost” as the host name and the password supplied by the dialog box.
If you stop the debugging session in VisualCafe, it shuts down the JVM inside of eDirectory and you will have to restart eDirectory to get it back up again.
The VisualCafe debugger has a lot of quirks. Be aware of the following:
To attach the jdb debugger, complete the following steps.
Enter the following command:
jdb -host localhost -password <password>
Set the path to your source directories using the “use” command.
If you stop the debugging session in jdb, it shuts down the JVM inside of eDirectory and you will have to restart eDirectory to get it back up again.
You can create a file called startup.jdb in the working directory that can contain commands that will be executed when jdb starts. This is a good place to put the “use” command to set up the source directories.
The password is really just an obfuscated version of the port number. Since you are picking a static port number, you can reuse any of the passwords that are generated. If you see one that is easy to memorize, remember and use it instead of using a new password every time.
A number of environment variables may be set to control the JVM under Windows NT and Windows 2000:
Table 3-1 JVM environment variables for Windows
The following options can be used on NetWare:
Table 3-2 JVM environment variables for NetWare