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
- Oracle Driver Jdbc
- Oracle Jdbc Driver Jar File Windows 7
- Oracle.eclipse.tools.database.jdbc.driver*.jar File Free Download
- Oracle.jdbc.driver.oracledriver Jar File
- Oracle.jdbc.driver.oracledriver Jar File Free Download
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
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
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.
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.
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:
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: