4 Connecting to Oracle Database Manually
The following sections describe establishing a connection to Oracle Autonomous Database manually without any build tool:
Topics:
- Downloading JDBC Driver and other JARs
This section lists the steps to download JDBC drivers and other JARs. - Building and Running a Sample Java Program
This section lists the step to build and run a sample Java program.
4.1 Downloading JDBC Driver and other JARs
This section lists the steps to download JDBC drivers and other JARs.
Make sure to complete all the steps from the Prerequisites section.
Download the 19c version of ojdbc8-full.tar.gz from OTN and unzip the contents to your classpath.
Note:
ojdbc8-full.tar.gz
contains the latest JDBC drivers: ojdbc8.jar
, ucp.jar
(required JAR for using UCP as a client-side connection pool), oraclepki.jar
, osdt_core.jar
, and osdt_cert.jar
. These JARs are required for using Oracle Wallets while connecting to Oracle Autonomous Database.
Parent topic: Connecting to Oracle Database Manually
4.2 Building and Running a Sample Java Program
This section lists the step to build and run a sample Java program.
Sample Output:

The screenshot below shows the queried rows, along with a success message:

Note:
If you connect to Oracle Autonomous Database from behind a firewall, you will likely encounter a connection timeout error. Make sure to be outside the firewall while running this sample or update thetnsnames.ora
file to use an HTTPS proxy.
See Also:
Using Oracle Autonomous Database Serverless for more information.Parent topic: Connecting to Oracle Database Manually