Home » Developer & Programmer » JDeveloper, Java & XML » see my error in jave (aamir.java [19:1] package oracle.jdbc.driver does not exist)
see my error in jave (aamir.java [19:1] package oracle.jdbc.driver does not exist) [message #207923] Thu, 07 December 2006 06:31
mfa786
Messages: 210
Registered: February 2006
Location: karachi
Senior Member
hi master
sir i am using oracle 9i and netbeans i have problem in connection
sir see my class

import java.sql.*;

public class aamir {

public aamir() {

DriverManager.registerDriver
(new oracle.jdbc.driver.OracleDriver()); --(error in this line)

Connection conn = DriverManager.getConnection
("jdbc:oracle:thin:@fahim:1521:aamir","muhammad","mfa786");
// @machineName:port:SID, userid, password

Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
while (rset.next())
System.out.println (rset.getString(1)); // Print col 1
stmt.close();


}

}


and this error

aamir.java [19:1] package oracle.jdbc.driver does not exist
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
^
1 error
Errors compiling aamir.


===========

sir please give me idea how i connect the oracle with natbeans

thank'k

aamir
Previous Topic: How to intrigate Oracle 10g Database with Oracle 10g Form in RHEL 4
Next Topic: which command will use to start the form developer...
Goto Forum:
  


Current Time: Fri Nov 22 04:41:56 CST 2024