Download Java Database Connectivity (JDBC) Drivers

If you are using Java applications alongside various different databases, then you must also need the respective Java Database Connectivity (JDBC) driver. A driver is a critical component in the bigger schemes…

Java Database Connectivity JDBC Drivers

If you are using Java applications alongside various different databases, then you must also need the respective Java Database Connectivity (JDBC) driver. A driver is a critical component in the bigger schemes that allows one component to be able to communicate with another. In this case, allowing a Java application to communicate with the database.

This article lists down how and from where you can download the JDBC drivers for the following databases:

  • MySQL
  • SQL Server
  • Oracle
  • PostgreSQL
  • Apache Derby (Java DB)
  • SQLite
  • H2
  • Microsoft Access

What is Java Database Connectivity (JDBC) Driver

As we already mentioned, the JDBC driver is used to allow Java applications to be able to communicate with different databases. It uses the JDBC API initially developed by Sun Microsystems as a means to use a standard method to access data in a variety of databases.

This technology now belongs to Oracle.

The JDBC drivers allow you to write one application that can send SQL statements to different data sources.

There are 4 different types of JDBC drivers:

  • JDBC-ODBC bridge driver
  • Native-API driver (partially java driver)
  • Network Protocol driver (fully java driver)
  • Thin driver (fully java driver)

Each of these driver types has its advantages and disadvantages. However, that is not what we will be discussing in this post.

Download JDBC Drivers

Refer to the below sections to download the respective JDBC drivers.

Note: Some drivers are downloaded as JAR files, which need to be added directly to your application’s classpath. While some drivers come as zipped bundles, which need to be extracted and then copy the appropriate JAR file to your application’s classpath.

Download JDBC Driver for MySQL

  1. Open MySQL Community Downloads page.

  2. Select your operating system and then click Go to download page.

    Select OS
    Select OS
  3. Click on the Download button for the preferred JDBC driver download.

    Click download
    Click download
  4. On the next page, click “No thanks, just start my download,” and your download should then begin automatically.

    Begin download
    Begin download

Download JDBC Driver for SQL Server

  1. Open the page for JDBC driver download for SQL Server.

  2. Under the Download section, click on the link that you want to download (ZIP and TAR.GZ). Clicking the link will begin the download instantly.

    Begin download 2
    Begin download

Download JDBC Driver for Oracle

  1. Open the Oracle Database JDBC driver and Companion Jars Downloads page.

  2. From here, you can download the regular JDBC drivers or the Long Term Release JDBC drivers for Oracle. Click on the respective link for the version that you want to download, and it should begin downloading instantly.

    Download regular JDBC driver for Oracle
    Download regular JDBC driver for Oracle
    Download Long Term Release JDBC driver for Oracle
    Download Long Term Release JDBC driver for Oracle

Download JDBC Driver for PostgreSQL

  1. Open the PostgreSQL JDBC drivers download page.

  2. Here, click on the links under the Current version section to begin downloading the latest JDBC driver for PostgreSQL.

    Begin download 3
    Begin download

    Alternatively, you can also download older versions of the drivers from the given table below.

    Download older versions
    Download older versions

Download JDBC Driver for Apache Derby

  1. Start by navigating to the downloads page for the JDBC driver for Apache Derby.

  2. Here, click on the version that you want to download.

    Select version
    Select version
  3. On the next page, under the Distributions section, click on the type and format of download you want to get for the JDBC driver, and your download should then begin automatically.

    Begin download 4
    Begin download

Download JDBC Driver for SQLite

  1. Open the GitHub page for SQLite JDBC driver.

  2. Here, click Code, and then click Download ZIP to download a compressed folder with the JDBC driver.

    Download driver
    Download driver
  3. Now extract the downloaded driver and then copy the appropriate JAR file to your application’s classpath.

Download JDBC Driver for H2 Database

  1. Open the H2 Database JDBC drivers download page.

  2. Now simply click on the link below the Downloads section to begin downloading the JDBC driver for the H2 database.

    Begin download 5
    Begin download

Download JDBC Driver for Microsoft Access

  1. Open the Microsoft Access JDBC drivers download page.

  2. Here, click on the link that you want to download.

    Start download
    Start download
  3. You will now be redirected to the next page where your download should begin automatically in the next few seconds.

This is how you can install the JDBC drivers for the respective databases. However, if your project uses Maven, then you will need to make a few changes to the POM.XML file as well.

Maven Dependencies for JDBC Drivers

In case your project uses Maven, add the respective piece of code to the POM.XML file.

Note: The versions of the dependencies listed in the code below may not be up to date. You can search on Maven Central Repository for the latest versions.

  • Maven dependency for MySQL JDBC driver

    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>8.0.11</version>
    </dependency>
  • Maven dependency for Microsoft JDBC driver for SQL Server

    <dependency>
        <groupId>com.microsoft.sqlserver</groupId>
        <artifactId>mssql-jdbc</artifactId>
        <version>8.2.1.jre11</version>
    </dependency>
  • Maven dependency for Oracle JDBC Driver

    <dependency>
        <groupId>com.oracle</groupId>
        <artifactId>ojdbc8</artifactId>
        <version>1.0</version>
        <scope>system</scope>
        <systemPath>d:/Path/To/Oracle/ojdbc8-full/ojdbc8.jar</systemPath>
    </dependency>
  • Maven dependency for PostgreSQL JDBC Driver

    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>42.2.2.jre7</version>
    </dependency>
  • Maven dependency for SQLite JDBC Driver

    <dependency>
        <groupId>org.xerial</groupId>
        <artifactId>sqlite-jdbc</artifactId>
        <version>3.21.0.1</version>
    </dependency>
  • Maven dependency for Apache Derby JDBC Driver

    <dependency>
        <groupId>org.apache.derby</groupId>
        <artifactId>derby</artifactId>
        <version>10.14.2.0</version>
    </dependency>
  • Maven dependency for H2 JDBC Driver

    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>2.1.210</version>
    </dependency>
  • Maven dependency for Microsoft Access JDBC Driver

    <dependency>
        <groupId>net.sf.ucanaccess</groupId>
        <artifactId>ucanaccess</artifactId>
        <version>4.0.4</version>
    </dependency>

Closing Words

The JDBC drivers are not for everyone, but only for those developers who need to make their applications communicate with various types of databases. If you are one of those, we certainly hope that this article helped you find the right drivers for your project.

Latest posts
Java 8 Offline Installers
Download Java 8 Update 391 (Offline Installers)

Java 8 Update 391 includes bug fixes and security patches to make your app experience better. Download it using the given offline installers.

View post
Java 8 Offline Installers
Download Java 8 Update 381 (Offline Installers)

Download the latest Java 8 update with bug fixes, new features, and improvements.

View post
Java 8 Offline Installers
Download Java 8 Update 371 (Offline Installers)

Learn about the latest Java 8 Update 371. Find out about its new features, bug fixes, and enhancements. Download the full offline installers for Windows, MacOS, Linux, and Solaris.

View post

Leave the first comment