Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

From: <vinay.g.vaze_at_boeing.com>
Date: Wed, 11 Nov 1998 18:27:24 GMT
Message-ID: <72ckud$2t4$1@nnrp1.dejanews.com>


I am trying to run the sample code which came alongwith the JDBC installation. It compiles okay. However, it gives the

error :

java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

I have set the classpath to c:\jdbc\lib. I am trying to connect to a local Oracle database (7.3.3) on a NT 4.0, JDK1.1.6.

Any ideas ?

class Employee
{
  public static void main (String args [])

       throws SQLException, ClassNotFoundException   {

    Class.forName ("oracle.jdbc.driver.OracleDriver");

    Connection conn =

      DriverManager.getConnection ("jdbc:oracle:thin:@dlsun511:1721:dbms733",
				   "scott", "tiger");


    Statement stmt = conn.createStatement ();     ResultSet rset = stmt.executeQuery ("select ENAME from EMP");

    while (rset.next ())
      System.out.println (rset.getString (1));   }
}

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Nov 11 1998 - 12:27:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US