Bridges > Java Export Bridge > Debugging Java Wrapper Objects

# Debugging Java Wrapper Objects

When running an application that relies on a Java wrapper object, it is often difficult to determine when errors occur in the associated IDL object. Since the instance of the wrapper object is invoked outside of IDL, the normal debugging capabilities of the IDL Workbench are not available.

However, it is possible to obtain this output by setting the IDL_BRIDGE_DEBUG environment variable as described in “IDL_BRIDGE_DEBUG” (Chapter 1, Using IDL). For example, if you set this environment variable to 1, you can see library load errors (on Windows), IDL execution errors, and output from IDL print commands. The appearance of debug information printed to stdout on Windows or UNIX depends upon the value set for the IDL_BRIDGE_DEBUG environment variable:

Value | Behavior
--- | ---
0 | Turn off debug output
1 | Turn on debug output, which includes output from library load errors, IDL execution errors, and PRINT statement output

To get additional Java-side diagnostics related to finding and loading the native libraries, define the IDL_LOAD_DEBUG parameter on the command line when starting a Java application, as follows:

java -DIDL_LOAD_DEBUG <class-to-run>