import oracle.jdbc.driver.*; import java.sql.*; public class Main { OracleDriver driver; public Main() { try{ // Load the Oracle JDBC driver DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection conn = DriverManager.getConnection( "jdbc:oracle:thin:@<server>:<port>:<sid>", <user_id>, <password>); // Create Oracle DatabaseMetaData object DatabaseMetaData meta = conn.getMetaData (); // get driver info: System.out.println("JDBC driver version is " + meta.getDriverVersion()); } catch (Exception e) { e.printStackTrace(); } } public static void main( String[] args ){ Main main = new Main(); } }