Oracle Jdbc Driver Jar File

Here’s a simple guide to show you how to add an Oracle JDBC driver into your Maven local repository, and also how to reference it in pom.xml

Jan 18, 2011  A JDBC example to show you how to connect to a Oracle database with a JDBC driver. Tested with: Java 8; Oracle database 19c; Oracle JDBC driver for Java 8, ojdbc8.jar; 1. Download Oracle JDBC Driver. Visit Oracle database website and download the Oracle JDBC Driver. Extends oracle.jdbc.driver.OracleDriver. The Oracle JDBC driver class that implements the java.sql.Driver interface. Register the JDBC drivers. To access a database from a Java application, you must first provide the code to register your installed driver with your program.

Tested with Oracle database 19c and Java 8

Jar
Note
Due to Oracle license restrictions, the Oracle JDBC driver is not available in the public Maven repository. To use the Oracle JDBC driver with Maven, you have to download and install it into your Maven local repository manually.

1. Get Oracle JDBC Driver

Oracle Driver Jdbc

Note
Read this What are the Oracle JDBC releases Vs JDK versions?

Visit Oracle database website and download it.

In this example, we selected Oracle database 19c and ojdbc8.jar for Java 8 project.

Note
Alternatively, you can get the Oracle JDBC driver from the Oracle database installed folder, for example: {ORACLE_HOME}jdbclibojdbc8.jar

2. Maven Install ojdbc8.jar

2.1 Upload or install the downloaded ojdbc.jar into the Maven local repository.

For older version.

ojdbc7.jar
Note
The -Dversion= is depends on your database version, in this example, we are using Oracle database 19c, so put -Dversion=19.3

2.2 Full example to install a ojdbc8.jar

3. pom.xml

Now, we can define the Oracle JDBC driver dependency like this:

pom.xml

For older version:

4. System Path

Alternatively, we can just download the .jar and tell the project to find the .jar in the system path like this:

pom.xml

Download Source Code

$ git clone https://github.com/mkyong/java-jdbc.git

References

Oracle Jdbc Driver Jar File Windows 7

About the Author

Oracle.eclipse.tools.database.jdbc.driver*.jar File Free Download

mkyong
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Oracle.jdbc.driver.oracledriver Jar File

Oracle jdbc jar

Oracle.jdbc.driver.oracledriver Jar File Free Download

Comments

Comments are closed.