Example - Using Weblogic’s Oracle Driver
package tutorial.jdbc.oracle;
public static void main (String argv[] ) throws Exception
{ //load the driver class from the local CLASSPATH
Class.forname(“weblogic.jdbc.oci.Driver”);
//connect to the database using the driver url and
// other properties like username, password and server
DriverManager.getConnection(“jdbc:weblogic:oracle:kayak”,
//statement class is instantiated using the connection
// class for executing queries
Statement stmt = conn.createStatement();
stmt.execute(“select * from empdemo”);