my dog learned polymorphism*
The moose likes Beginning Java and the fly likes Database Connectivity Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Database Connectivity Exception" Watch "Database Connectivity Exception" New topic
Author

Database Connectivity Exception

syed quadri
Greenhorn

Joined: Nov 11, 2012
Posts: 10
hi every one i am getting an Exception while i am connecting to the database by IDE Netbeans an by using command prompt i can sucessfully connected to the database but whenever i run same program by IDE Netbeans then i will get Runtime Exception can any budy helpe me to run the following program by using IDE Netbeans......


following Exception i am getting.....

at the time of runing this program i set the path at command prompt but in IDE Netbeans i dont know how to set the path .can any one show me how to set the path in IDE.....
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3432
    
  12
syed quadri wrote:hi every one i am getting an Exception

Do you think it might be useful to tell us what the exception was and which line of your code it was being thrown from ?


Joanne
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3432
    
  12
syed quadri wrote:Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

So the program can't find the class oracle.jdbc.driver.OracleDriver when you run it in the IDE.
How does the program know where this class is when you run it from the command line ?
 
jQuery in Action, 2nd edition
 
subject: Database Connectivity Exception
 
Similar Threads
java.sql.SQLException: Io exception: The Network Adapter could not establish the conn
Accessing MySQL from NetBeans
Java-Xml file not getting Connected to DataBase
Accessing MySQL from NetBeans
Using JDBC to connect oracle