QuickStart Java applications with Oracle AI Autonomous Database

Follow these steps to connect your Java applications to Oracle AI Autonomous Database (ADB), using the Oracle JDBC driver and Universal Connection Pool. Oracle Autonomous Database allows both one-way TLS as well as mutual TLS (mTLS) for connection, the default being the latter. With one-way TLS you don't need any wallet to connect to Autonomous Database. Oracle recommends using the latest Oracle JDBC version 26ai which is the Long Term Support release.

If you want to connect to the Oracle Database (On-Premises) or Oracle Cloud Database that uses TCP connections then see QuickStart Java applications with Oracle Database (On-premises). Refer to Oracle JDBC and UCP landing page for other technical briefs, blogs, videos etc.,

Pre-requisites (one-wayTLS and mTLS)

  • Pre-requisites (one way TLS)

    • 1. Provision an Autonomous Database (ADB) Instance
    • 2. Remove Mutual TLS (mTLS) Requirement
    • 3. Install latest JDK
    • 4. Download a sample program from Github
  • Pre-requisites (mutual TLS)

    • 1. Provision an Autonomous Database (ADB) Instance
    • 2. Obtain Client Credentials
    • 3. Install the JDK
    • 4. Download a sample program from Github

Maven and Gradle

  • Maven Project

    • 1. Setup a Maven project
    • 2. Build and Run a Sample Java Program
  • Gradle Project

    • 1. Setup a Gradle project
    • 2. Build and Run the Gradle App

Eclipse and IntelliJ

  • Eclipse

    • 1. Setup a Maven project
    • 2. Build and Run a Sample Java Program
  • IntelliJ

    • 1. Setup a Maven project
    • 2. Build and Run ADBQuickStart

No Build Tools

  • No Build Tools

    • 1. Download JDBC Driver and other Jars
    • 2. Build and Run a Sample Java Program