Here you can find the source of getOracleConnection()
public static Connection getOracleConnection() throws Exception
//package com.java2s; import java.sql.Connection; import java.sql.DriverManager; public class Main { public static Connection getOracleConnection() throws Exception { String driver = "oracle.jdbc.driver.OracleDriver"; String url = "jdbc:oracle:thin:@localhost:1521:caspian"; String username = "mp"; String password = "mp2"; Class.forName(driver); // load Oracle driver Connection conn = DriverManager.getConnection(url, username, password); return conn; }//from www.ja v a2 s . c o m }