This discussion is archived
6 Replies Latest reply: Aug 15, 2013 10:33 AM by 4948ec00-1a38-46d9-bb14-0faf6b9c4a49 RSS

problem during make connection by oracle.jdbc.driver.OracleDriver

4948ec00-1a38-46d9-bb14-0faf6b9c4a49 Newbie
Currently Being Moderated

Hi everybody,

 

During run time, i am getting this problem

Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

 

My program is

import java.sql.*;

 

public class DBOpp

{

  public static void main(String args []) throws Exception{

class.forNmae("oracle.jdbc.driver.OracleDriver");

Connection con=DriverManager.getConnection

   ("jdbc"oracle:thin:@localhost:1251:myoracle", "scott","tiger");

 

  System.out.println("Connection established ");

  Statement stmt=con.createStatement();

String str1="insert into abc values ( 145,'wersd','GHTYR');

stmt.executeUpdate(str1);

con.close();

 

}

}

I am using JDK 1.5.0.2 and oracle 9i ( server ).

JDK1.5.0.2 is in c drive and oracle is in E drive.

 

I would like to know how i can solve this problem.

 

  Thanks & Regards

   Dipak 

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points