OpenLink Logo

ODBC-to-JDBC Bridge

Connect ODBC Applications to JDBC-Only Data Sources

Enable ODBC-compliant applications to connect to data sources that only have a JDBC Driver, or where the JDBC Driver offers superior connectivity to the default ODBC Driver. The Lite Edition Single-Tier driver transparently bridges ODBC and JDBC protocols on macOS.

Installation Process

The installation process is straightforward and typically takes 5-10 minutes. Follow the 15-step timeline below:

Download DMG File

The Lite Edition is distributed in a single disk image (.dmg) file containing a Macintosh Installer package (.mpkg).

DMG file

Double-Click MPKG

Double-click the .mpkg to start the installation process.

MPKG file

Warning Dialog

You will encounter a warning message asking if you are sure you want to install the software. Click Continue.

Warning

Welcome Screen

The installer displays a Welcome message. Click "Continue."

Welcome

Read Me File

The next screen displays the Read Me file with last-minute updates. Please read carefully and click "Continue".

Read Me

License Agreement

The License Agreement for the Lite Edition is displayed. Read and click "Continue."

License

Agree Dialog

You will be prompted to "Agree" to continue the installation or "Disagree" to abort.

Agree

Select Destination

You will be asked to select a Destination Volume. Generally, this should be your macOS boot volume. Click the desired disk icon and then click "Continue."

Destination

Installation Mode

You may now choose Easy Install (recommended), or if you are an experienced user, you may Customize which components are installed.

Easy Install

Upgrade or Install

If you have installed OpenLink or iODBC components in the past, click "Upgrade" to continue. Otherwise, click "Install."

Custom Components

If you chose the custom option, select which of the listed components to install.

Custom Install

Authentication

You must have an Administration username and password to install this driver. Enter your macOS Username and Password.

Authentication

Progress & Optimization

You will be shown a graphical progress bar as the Installation progresses, followed by System Optimization.

License File Selection

After the driver has been installed, you will be prompted to locate a license file.

License Selection
License File Details:
Default Location: /Library/Application Support/openlink/Licenses/
License Filename: jdbc_lt.lic

If a correctly named file already exists in $OPL_LICENSE_DIR or /Library/Application Support/openlink/Licenses/, you will not see this dialog. If the existing file is not valid (evaluation has expired, it's for a different OS, etc.), you will need to manually apply a valid license file after installation is completed.

Choose one option:

  • Use Existing: If a license file already exists on the machine. Previously generated license files may be re-downloaded from your ODS-Briefcase data space.
  • Try or Buy: If you need to obtain a new trial or permanent license file. This will load a relevant web page from which you can obtain a license file.

Completion

When the process is complete, you will be told that the software was successfully installed. Click "Close" and the Single-Tier "Lite" Edition ODBC Driver for JDBC Data Sources is ready for use.

Success
Important Note: If the license file dialog is hidden by the Installer or other windows, minimize or move windows to see it. Not responding to this dialog will prevent proper installation completion.

Java Environment Setup & JDBC Testing

Before configuring ODBC DSNs, verify that your JDBC drivers are properly installed and accessible. This section guides you through environment setup and provides a Java utility to test JDBC driver connectivity.

Locate JDBC Driver JAR Files

Determine the location of the JAR files for each JDBC driver you plan to use. Ideally, place all JDBC driver JARs in a common directory for easier management.

/Library/Java/Extensions/
  ├── postgresql-42.7.jar
  ├── mysql-connector-java-8.0.jar
  ├── ojdbc8.jar
  └── other-jdbc-drivers.jar

Set CLASSPATH Environment Variable

Ensure the CLASSPATH operating system environment variable includes entries for each JDBC driver JAR file location. Add this to your shell profile (e.g., ~/.bash_profile, ~/.zshrc):

export CLASSPATH=".:$CLASSPATH" export CLASSPATH="/Library/Java/Extensions/*:$CLASSPATH"

Then reload your shell: source ~/.zshrc

Save UniversalJDBCTest.java

Copy the complete UniversalJDBCTest Java source code below to a file named UniversalJDBCTest.java. This utility discovers installed JDBC drivers and tests their connectivity.

Save Location: Create this file in your project directory or a dedicated test folder. You can name it UniversalJDBCTest.java.

import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Driver;
import java.util.Enumeration;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.io.Console;

public class UniversalJDBCTest {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Console console = System.console();

        System.out.println("=== Universal JDBC Connection Test ===\n");

        // Collect registered JDBC drivers
        List<Driver> driverList = new ArrayList<>();
        Enumeration<Driver> drivers = DriverManager.getDrivers();
        System.out.println("Available JDBC Drivers:\n");

        int index = 1;
        while (drivers.hasMoreElements()) {
            Driver driver = drivers.nextElement();
            driverList.add(driver);
            System.out.printf("%d) %s (v%d.%d)\n",
                    index++, driver.getClass().getName(),
                    driver.getMajorVersion(), driver.getMinorVersion());
        }

        if (driverList.isEmpty()) {
            System.out.println("⚠️ No JDBC drivers are registered with DriverManager.");
            System.out.println("Make sure your driver JARs are on the classpath.");
            scanner.close();
            return;
        }

        // Prompt user to select a driver
        System.out.print("\nSelect a driver by number: ");
        int driverChoice = -1;
        while (driverChoice < 1 || driverChoice > driverList.size()) {
            if (scanner.hasNextInt()) {
                driverChoice = scanner.nextInt();
                if (driverChoice < 1 || driverChoice > driverList.size()) {
                    System.out.print("Invalid choice. Please enter a valid driver number: ");
                }
            } else {
                System.out.print("Please enter a number: ");
                scanner.next(); // discard invalid input
            }
        }
        scanner.nextLine(); // consume newline

        Driver selectedDriver = driverList.get(driverChoice - 1);
        System.out.println("\nSelected Driver: " + selectedDriver.getClass().getName());

        // Prompt for connection parameters
        System.out.print("\nEnter JDBC URL (e.g., jdbc:oracle:thin:@host:port:sid): ");
        String jdbcUrl = scanner.nextLine().trim();

        System.out.print("Enter username: ");
        String username = scanner.nextLine().trim();

        String password;
        if (console != null) {
            char[] pwChars = console.readPassword("Enter password: ");
            password = new String(pwChars);
        } else {
            System.out.print("Enter password (visible): ");
            password = scanner.nextLine();
        }

        // Attempt connection
        System.out.println("\nConnecting...");
        try (Connection conn = DriverManager.getConnection(jdbcUrl, username, password)) {
            DatabaseMetaData metaData = conn.getMetaData();

            System.out.println("\n=== Connection Metadata ===");
            System.out.println("JDBC Driver Name: " + metaData.getDriverName());
            System.out.println("JDBC Driver Version: " + metaData.getDriverVersion());
            System.out.println("JDBC Spec Version: " +
                    metaData.getJDBCMajorVersion() + "." + metaData.getJDBCMinorVersion());
            System.out.println("Database Product Name: " + metaData.getDatabaseProductName());
            System.out.println("Database Product Version: " + metaData.getDatabaseProductVersion());
            System.out.println("\n✅ Connection successful!");
        } catch (SQLException e) {
            System.err.println("\n❌ SQL Error: " + e.getMessage());
            e.printStackTrace();
        } finally {
            scanner.close();
        }
    }
}

Select the code above and copy it to your text editor, then save as UniversalJDBCTest.java. Ensure the filename matches the public class name exactly.

Compile the Java Source

Compile the UniversalJDBCTest.java file with the JDBC driver classes in the classpath:

javac -cp ".:/{JDBC-JAR-FILES-DIRECTORY}/*" UniversalJDBCTest.java

Example:

javac -cp ".:/Library/Java/Extensions/*" UniversalJDBCTest.java

This creates UniversalJDBCTest.class in the same directory.

Run the JDBC Test Utility

Execute the compiled test program with the same classpath:

java -cp ".:/{JDBC-JAR-FILES-DIRECTORY}/*" UniversalJDBCTest

Example:

java -cp ".:/Library/Java/Extensions/*" UniversalJDBCTest

The program will display all discovered JDBC drivers and prompt you to select one for connection testing.

Verify Connection Success

When prompted, enter your JDBC connection details (URL, username, password). A successful connection displays driver metadata:

=== Universal JDBC Connection Test ===

Available JDBC Drivers:

1) com.informix.jdbc.IfxDriver (v4.2)
2) com.informix.jdbc.InformixDriver (v15.0)
3) virtuoso.jdbc4.Driver (v3.120)
4) org.postgresql.Driver (v42.7)
5) oracle.jdbc.OracleDriver (v23.8)
6) openlink.jdbc4.Driver (v4.56)
7) com.amazonaws.athena.jdbc.AthenaDriver (v1.0)
8) com.mysql.cj.jdbc.Driver (v9.3)
9) com.microsoft.sqlserver.jdbc.SQLServerDriver (v12.10)

Select a driver by number: 5

Selected Driver: oracle.jdbc.OracleDriver

Enter JDBC URL (e.g., jdbc:oracle:thin:@host:port:sid): jdbc:oracle:thin:@54.172.89.18:1521/XE
Enter username: hr
Enter password: 

Connecting...

=== Connection Metadata ===
JDBC Driver Name: Oracle JDBC driver
JDBC Driver Version: 23.8.0.25.04
JDBC Spec Version: 4.3
Database Product Name: Oracle
Database Product Version: Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
Version 18.4.0.0.0

✅ Connection successful!

If the connection fails: Verify CLASSPATH settings, JDBC driver JAR location, database connectivity, and credentials before proceeding to DSN configuration.

Best Practice: Use the UniversalJDBCTest utility to validate JDBC driver installation before configuring DSNs. Successful connectivity here ensures the driver is properly configured and your database is reachable before proceeding to ODBC configuration.

Configuration & DSN Setup

After verifying JDBC driver connectivity, configure ODBC DSNs to enable legacy ODBC applications to use these JDBC drivers. Run the OpenLink iODBC Administrator located in /Applications/iODBC folder. Follow these configuration steps:

Open iODBC Administrator

Launch the OpenLink iODBC Administrator application from the /Applications/iODBC folder.

iODBC Administrator

Select System DSN Tab

Click the System DSN tab to manage system-wide data sources accessible to all applications.

System DSN Tab

Click Add Button

Click the "Add" button to create a new Data Source Name.

Select Driver

Select "OpenLink JDBC Lite Driver" from the list of available drivers. Choose the Unicode version if you're working with multi-byte character sets.

Available Drivers

Click Finish

Click "Finish" to proceed to the Data Source Name configuration screen.

Enter DSN Name

The Data Source tab prompts you to enter a Data Source Name and optional description. This name will be used by applications to reference this connection.

DSN Name

Configure Connection Parameters

The Connection Tab requires three minimum fields:

  • JDBC Driver: Class name (e.g., virtuoso.jdbc3.Driver)
  • URL String: Connection URL (e.g., jdbc:virtuoso://localhost:1111/)
  • Username: Database username
Connection Tab

Configure Options

The Options tab provides performance and compatibility settings:

  • Row Buffer Size: Records per network hop (1-99)
  • Hide Login Dialog: Suppress login prompts
  • Read Only Connection: Uncheck for read/write access
  • Defer Fetching of Long Data: Improve performance
  • Multiple Active Statements Emulation: Enable concurrent statements
Options Tab

Advanced Preferences

Click "Continue" to access additional advanced preferences for cursor sensitivity, SQL initialization, and memory management:

  • Initialization SQL: Auto-execute SQL on connection
  • Cursor Sensitivity: Row update detection
  • Max Rows Override: Limit result set size
  • Disable AutoCommit: Manual commit mode
Preferences Tab

Save Configuration

Click "Finish" to save your new Data Source Name. The DSN is now available for use by ODBC-compliant applications.

Frequently Asked Questions

What is the difference between ODBC and JDBC?

ODBC (Open Database Connectivity) is a Windows-centric standard API for accessing databases, widely used by Windows applications and some Mac legacy software. JDBC (Java Database Connectivity) is Java's native database API, increasingly the standard in modern applications.

The ODBC-to-JDBC Bridge translates between these two protocols, allowing applications written for ODBC to connect to databases that only provide JDBC drivers.

Do I need administrator privileges to install?

Yes. The installation process requires macOS administrator username and password. This is necessary to install system-level drivers and libraries in protected directories like /Library/Java/Extensions/.

Which macOS versions are supported?

The Lite Edition is supported on Intel-based Macs running macOS 10.4 (Tiger) and later. PowerPC-based Macs can use it up to Snow Leopard (10.6). For Intel Macs on Snow Leopard or later, PowerPC applications cannot connect through the Lite Edition—use the Multi-Tier Enterprise Edition instead.

What Java versions are compatible?

All Java software shipped by Apple as part of macOS is compatible. For Lion (10.7) and later, Java from Oracle (java.com) is fully supported. For older systems, the system-included JRE is recommended.

How do I configure the driver for my database?

Open the iODBC Administrator (in /Applications/iODBC), click System DSN, then Add. Select the OpenLink JDBC Lite Driver, provide your JDBC driver class name, connection URL, and credentials. The Connection Tab requires three fields: JDBC Driver, URL String, and Username.

Do I need a license to use the Lite Edition?

Yes. After installation, you'll be prompted to locate or obtain a license file. OpenLink offers evaluation licenses for testing and permanent licenses for production use. Previously generated licenses can be re-downloaded from your ODS-Briefcase data space.

Can I run multiple concurrent connections?

Yes. The driver supports multiple concurrent connections to the same or different databases. Additionally, you can enable "Multiple Active Statements Emulation" in advanced options to allow multiple concurrent statements within a single connection, even if the underlying database doesn't natively support this feature.

What should I do if the installation fails?

First, ensure you have administrator privileges and sufficient disk space. Verify that your JDBC drivers are properly installed in /Library/Java/Extensions/. If problems persist, check the installation log or contact OpenLink Product Support. Common issues include missing JDBC drivers or incompatible Java versions.

How do I optimize performance?

Several options can improve performance: increase Row Buffer Size for fewer network round-trips, disable High Cursor Sensitivity unless you need row update detection, defer long data fetching to avoid unnecessary data transfers, and consider adjusting Max Rows Override to limit result sets. Monitor actual performance with your specific workload.

Technical Glossary

ODBC - Open Database Connectivity

A standard database interface API that allows applications to connect to various database systems. Widely used on Windows and supported on Mac for legacy applications.

JDBC - Java Database Connectivity

The Java native database API that enables Java applications to interact with relational databases. Increasingly the standard in modern applications and cloud systems.

DSN - Data Source Name

A named configuration for connecting to a specific database. Contains the database location, driver name, credentials, and connection parameters. DSNs simplify application configuration.

JRE - Java Runtime Environment

The software runtime that executes Java applications and bytecode. Required for any Java-based driver or application to function on your system.

JAR File - Java Archive

A compressed archive format containing Java class files and resources. JDBC drivers are typically distributed as JAR files installed in the system CLASSPATH.

CLASSPATH - Java Class Path

A system variable specifying the directories where Java looks for class files and libraries. On macOS, /Library/Java/Extensions/ is the default CLASSPATH directory.

SQL - Structured Query Language

The standard language for querying and manipulating relational databases. Both ODBC and JDBC use SQL as their query language.

JVM - Java Virtual Machine

The abstract computing machine that enables Java applications and bytecode to run on any platform. JVM options control memory, threading, and performance parameters.

OPL_JVM_OPTS - OpenLink JVM Options

An environment variable where custom Java command-line arguments can be specified to configure JVM behavior when running the JDBC driver.

Single-Tier Architecture

A deployment model where all driver components run on the client machine without requiring a separate middleware server, reducing complexity but limiting scalability.

Multi-Tier Architecture

A deployment model where driver components are distributed across client and server machines, enabling better scalability and more sophisticated configurations.

BLOB - Binary Large Object

A database data type for storing large binary data such as images, videos, or encrypted files. The driver supports deferred fetching of BLOB data.