Bridges > Java and COM - IDL Objects > Configuring Build And Client Machines

# Configuring Build And Client Machines

This section describes how to configure the following:

- Build machines that run the Export Bridge Assistant
- Build machines that use the wrapper objects created by the Assistant in an external development environment (if different)
- Client machines running applications that rely on wrapper objects

As a developer of applications that use wrapped IDL objects, you should be familiar with all of the information in this section.

## Configuring the Machine Running the Assistant

The computer that runs the Export Bridge Assistant must meet the following requirements:

Item | Description
--- | ---
General Requirements | IDL must be installed. The IDL source object does not need to be in the IDL path to be used by the Assistant, but does to be used by the client application (see below). Any IDL code referenced by the source object must be in the same directory as the source object or in the IDL path. Drawable IDL objects that inherit from IDLgrWindow, IDLitWindow, and IDLitDirectWindow have special requirements as described in Requirements for Drawable Objects.
COM Requirements | Visual Studio must be installed.
Java Requirements | Java must be installed, and javac must be in the execution path.

Note: See Supported Platforms and IDL Modes for supported COM and Java versions.

## Configuring the Machine Using Wrapper Objects

If different from the machine running the Assistant, the machine using wrapper objects in application development must meet the following requirements in addition to the requirements listed for the Assistant (Configuring the Machine Running the Assistant).

### COM Registration Requirements

The wrapper object generated by the Assistant must be registered using regsvr32 <wrapperName>.DLL for non-drawable objects or regsvr32 <wrapperName>.OCX for drawable objects. To register a file:

1. Select Start > Run, type cmd in the text box and click OK to open the Command Prompt window.
2. Use the cd command to change to the directory containing the file to be registered.
3. Enter regsvr32 <wrapperName>.DLL or <wrapperName>.OCX to register the file.

A message box will report the successful registration of the file.

Note: If needed, you can unregister a file by using the -u flag as in:

`regsvr32 -u <wrapperName>.DLL`

See Wrapper Generation Example for a short example that exports and uses a simple IDL object.

### Java Requirements

Java must be installed. Both javac and java must be in the execution path.

Note: The Java runtime environment installation does not provide javac.

For compilation and execution, the file

IDL_DIR/resource/bridges/export/java/javaidlb.jar

must be in the Java classpath.

For Java routines to use the exported java objects, they must use the following import statement:

import com.idl.javaidl.*

On UNIX systems, the LD_LIBRARY_PATH environment variable (DYLD_LIBRARY_PATH on Mac OS X) must include the IDL bin.<platform>.<arch> directory. The PATH environment variable must also include this directory.

The IDL_PATH environment variable must include the directory containing the IDL source object source or SAVE file. In most cases, the variable should also include the default IDL library so that IDL routines can be resolved.

See Wrapper Generation Example for a short example that exports and uses a simple IDL object.

### The bridge_setup Script

On UNIX platforms, source the <IDL_DIR>/bin/bridge_setup script to set the appropriate values for the IDL_DIR, LD_LIBRARY_PATH, and CLASSPATH environment variables. (The <IDL_DIR>/bin directory also contains versions of this script for use with the korn or bash shells.)

Note: On 64-bit Linux platforms, the bridge_setup script will specify the 32-bit version of IDL by default, since Linux systems may use the 32-bit version of Java as the default. To explicitly specify that the 64-bit version of IDL should be used, set the IDL_PREFER_64 environment variable. (The value to which this environment variable is set is not important; if it is defined at all the 64-bit version of IDL will be used.)

There is no bridge_setup script for Windows platforms. In most cases, setting the CLASSPATH environment variable (or specifying the class path along with the java or javac command at the command line) is the only configuration necessary.

## Configuring the Machine Running the Wrapper Client

The machine running the COM or Java application that uses a wrapper object must have either a licensed version of IDL or a copy of the IDL Virtual Machine installed. (Note that applications that use the ExecuteString method will not work in the IDL Virtual Machine.) Additionally, the IDL .pro or .sav file containing the object definition must be in the IDL path. This requirement also applies to any IDL files called by code in the source object.

### COM Applications

For a COM application:

- The executable file (.exe), and any .dlls generated during the Visual Studio build process must be made available to the client.
- The .dll or .ocx file associated with a custom wrapper object must be registered on the client machine. The client need not have Visual Studio installed.

Note: Applications using the connector wrapper object need not register the connector object .dll. This file is automatically registered upon IDL installation.

- For an application built in a .NET language (such as Visual Basic .NET or C#), the Microsoft .NET Framework must be installed on the client machine.

### Java Applications

For a Java application:

- The Java Runtime Environment (JRE) must be installed (see Supported Platforms and IDL Modes for supported version information)
- The executable .class file must be made available to the client
- IDL_DIR/resource/bridges/export/java/javaidlb.jar must be in the Java classpath

Note: On UNIX systems, it is advisable to execute the bridge_setup script on the client machine as part of the Java application initialization. This ensures that IDL is properly configured on the client machine. See The bridge_setup Script for details.