InterSystems provides a fully compliant (JDBC 4.2), pure Java, type 4 JDBC driver, which is a single standalone JAR file with no dependencies. If you are already familiar with JDBC, and have a JDK 1.7 or 1.8 installed, all you need to do is to add the JDBC driver to your local CLASSPATH. The JDBC URL (connection string) is:
where the variables represent the InterSystems IRIS™ instance host’s IP address, the instance’s superserver port, and a namespace on the instance.
If you are connecting to an instance on the local machine (either using a hostname of localhost or an IP address of 127.0.0.1), the connection automatically uses a special, high-performance, local connection called a shared memory connection.
Download the driver
System requirements are version 1.7 or 1.8 of the JDK, a Java IDE of your choice, and a running InterSystems IRIS instance to which you can connect. Add the InterSystems IRIS JDBC driver, intersystems-jdbc-3.0.0.jar, to your local CLASSPATH. You can download this file from https://github.com/intersystems/quickstarts-java/tree/master/lib. If you have installed InterSystems IRIS on your local machine or another machine to which you have access, you can find the file in install-dir\dev\java\lib\JDK18 or install-dir\dev\java\lib\JDK17, where install-dir is the InterSystems IRIS installation directory.
One of many Java connectivity options
The InterSystems IRIS JDBC driver is the core InterSystems IRIS Java component, and supports traditional relational (SQL) access. It also provides the connection mechanism for Java calls that use the InterSystems IRIS Native API for Java, which accesses the data in its natively stored format. For Java integration based on objects, InterSystems IRIS also provides a separate feature: the InterSystems IRIS XEP component.
Taken all together, InterSystems IRIS provides a unique set of capabilities to use the same physical connection and transaction context to manipulate data using multiple paradigms: native, relational, and object-oriented. For more complex applications, InterSystems fully supports Hibernate. Enabling all these forms of connectivity — InterSystems IRIS XEP, Hibernate, and also the InterSystems IRIS Spark Connector — is the InterSystems IRIS JDBC driver.
Shared memory connections
As with other database platforms, a JDBC connection to a remote InterSystems IRIS instance is over TCP/IP. To maximize performance, InterSystems IRIS also offers a Java shared memory connection. Shared memory connections are available to Java applications running on the same machine as an InterSystems IRIS instance.
A shared memory connection is a temporary device, backed virtual memory, which is shared by a JDBC client and an instance of InterSystems IRIS running on the same physical machine. Further, these connections do not require potentially expensive calls into the kernel network stack. By using a channel directly from the JDBC client to InterSystems IRIS, they provide the ultimate in low latency and high throughput for JDBC operations.
For detailed information on shared memory, see “Shared Memory Connections” in Using Java with the InterSystems JDBC Driver.
To learn more about JDBC, other Java interoperability technologies in InterSystems IRIS, and other related topics, see:
“InterSystems Java Connectivity Options” in Using Java JDBC with InterSystems IRIS — overview of all InterSystems IRIS Java technologies enabled by the JDBC driver.
Using Java with the InterSystems JDBC Driver — InterSystems documentation: step-by-step instructions for using JDBC.
First Look: XEP Object Persistence with InterSystems IRIS — InterSystems documentation: Java XEP First Look
First Look: InterSystems IRIS Native API for Java — InterSystems documentation: InterSystems IRIS Native API First Look
Java Overview — InterSystems online learning: introductory video
Persisting Java Objects with InterSystems XEP — InterSystems documentation: step-by-step instructions for using XEP
InterSystems Implementation Reference for Java Third Party APIs — InterSystems documentation: connecting to InterSystems IRIS using JDBC, Hibernate, and Spark.
Using the InterSystems Spark Connector — InterSystems documentation: using InterSystems IRIS as an Apache data source
Hibernate and JDBC compared — Stack Overflow article