You can establish a database connection in pure JDBC code.
To code a JDBC Connection:
import java.sql.*;
This statement is required for all JDBC programming.
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection(parameters...);
There are three driver manager getConnection methods, differing in the number and types of their parameters.
For more information, see the Oracle9i JDBC Developer's Guide and Reference. This document is available online at the Oracle Technology Network (OTN) website, at otn.oracle.com/docs/products/oracle9i/content.html.
Embedding SQL in Java Programs with
JDBC
Configuring Database Connections
Registering a New Third-Party
JDBC Driver
Connection Requirements for Oracle's
Type 2 JDBC Drivers (OCI)