I am using oracle8,jdk1.4 and windows2000 server. I got oracle thin driver in itself.I unzipped classes111.zip and addded classes111.zip file in classpath. And i made the connection as folllows
String url = "jdbc
racle:thin:@host123:1521
RCL";
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}
try {
con = DriverManager.getConnection(url, "scott", "tiger");
stmt = con.createStatement();
stmt.executeUpdate(createString);
stmt.close();
con.close();
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}
But when i run this i am getting error as
F:\>
java CreateCoffees
ClassNotFoundException: myDriver.ClassName
SQLException: No suitable driver
Can anyone tell me what is wrong in this?