Previous IDL Connectivity Bridges: Using Java Objects in IDL Next

Initializing the IDL-Java Bridge

The IDL-Java bridge must be configured before trying to create and use Java objects within IDL. The IDL program initializes the bridge when it first attempts to create an instance of IDLjavaObject. Initializing the bridge involves starting the Java Virtual Machine, creating any internal Java bridge objects (both C++ and Java) including the internal IDLJavaBridgeSession object. See The IDLJavaBridgeSession Object for more information on the session object.

Configuring the Bridge

The .idljavabrc file on UNIX or idljavabrc on Windows contains the IDL-Java bridge configuration information. Even though the IDL installer attempts to create a valid working configuration file based on IDL location, the file should be verified before trying to create and use Java objects within IDL.

The IDL-Java bridge looks for the configuration file in the following order:

  1. If the environment variable IDLJAVAB_CONFIG is set, the file it indicates is used.
  2.  


    Note
    This environment variable must include both the path and the file name of the configuration file.

     

  3. If the environment variable IDLJAVAB_CONFIG is not set or the file indicated by that variable is not found in that location, the path specified in the HOME environment variable is used to try to locate the configuration file.
  4.  

  5. If the file is not found in the path indicated by the HOME environment variable, the <IDL_DEFAULT>/resource/bridges/import/java path is used to try to locate the configuration file.

The configuration file contains the following settings. With a text editor, open your configuration file to verify these settings are correct for your system.

The IDL-Java bridge usually only uses the configuration file once during an IDL session. The file is used when the first instance of the IDLjavaObject class is created in the session. If you edit the configuration file after the first instance is created, you must exit and restart IDL to update the IDL-Java bridge with the changes you made to the file.

  IDL Online Help (March 06, 2007)