Oracle JDBC Driver Maven Dependency

This page gives you a quick reference to get Oracle JDBC driver for Maven or Gradle projects. You can also download the Oracle JDBC driver, the link given at the "Download JAR File" section.

What is JDBC Driver?

A JDBC driver is a set of Java classes that implement the JDBC interfaces, targeting a specific database. The JDBC interfaces come with standard Java, but the implementation of these interfaces is specific to the database you need to connect to. Such an implementation is called a JDBC driver.
The Oracle driver is used in Java application to connect to the Oracle database using JDBC API.

Oracle JDBC Driver Maven Dependency

The Oracle JDBC Driver is available on Maven Central. Copy below Oracle JDBC driver maven dependency and paste in your project pom.xml file.
For JDK 10 and 11, use the following Maven dependency:
<dependency>
    <groupId>com.oracle.ojdbc</groupId>
    <artifactId>ojdbc10</artifactId>
    <version>${oracle.version}</version>
</dependency>
For JDK 8, use the ojdbc8 artifact instead:
<dependency>
    <groupId>com.oracle.ojdbc</groupId>
    <artifactId>ojdbc8</artifactId>
    <version>${oracle.version}</version>
</dependency>
For more details about the proper version to use, check out the following maven central link.

Oracle JDBC Driver Gradle Dependency

Copy below Oracle JDBC driver Gradle dependency and paste in your project build.gradle file.
For JDK 10 and 11, use the following Maven dependency:
// https://mvnrepository.com/artifact/com.oracle.jdbc/ojdbc10
compile group: 'com.oracle.jdbc', name: 'ojdbc10', version: '19.3.0.0'
For JDK 8, use the ojdbc8 artifact instead:
// https://mvnrepository.com/artifact/com.oracle.jdbc/ojdbc8
compile group: 'com.oracle.jdbc', name: 'ojdbc8', version: '12.2.0.1'

Download JAR File

Check for Other Releases

Reference


Comments