Bookmark Topic Watch Topic
  • New Topic

problem in connecting to database.

 
saurabh dudeja
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi I have written a simple program in java to connect to a database

for this funcions

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

I am getting error

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

please help me out with this.
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
saurabh dudeja wrote:
Class.forName("oracle.jdbc.driver.OracleDriver");

Look for the oracle driver .jar file is on classpath or not?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question more than once. Thanks
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!