File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes problem in connecting to database. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Reply locked New topic
Author

problem in connecting to database.

saurabh dudeja
Greenhorn

Joined: Mar 26, 2009
Posts: 11
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

Joined: Feb 19, 2008
Posts: 2896
    
    1

saurabh dudeja wrote:
Class.forName("oracle.jdbc.driver.OracleDriver");

Look for the oracle driver .jar file is on classpath or not?


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Please do not post the same question more than once. Thanks


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: problem in connecting to database.
 
Similar Threads
how connect with database using hyper link
The Network Adapter could not establish the connection in jdbc connection
ojdbc driver problem
oracle9i not being connect
No suitable driver found for jdbc:oracle