Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC and the fly likes JDBC driver error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC driver error" Watch "JDBC driver error" New topic
Author

JDBC driver error

kimi lynn
Greenhorn

Joined: Jun 02, 2003
Posts: 27
Hello,
I've downloaded MySQL Connector/J 3.0 zip file for the windows box.when I unzipped, had a directory, mysql-connector-java-3.0.10-stable and inside it I had this mysql-connector-java-3.0.10-stable-bin.jar file.I copied this file to j2sdk1.4.1_02/jre/lib/ext and when i try to run the following program, it throws me with error.Any ideas???
Thanks in advance.
public class test {
public static void main(String[] args) {
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
System.out.println("Good to go");
} catch (Exception E) {
System.out.println("JDBC Driver error");
}
}
}
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Is it throwing the error that you have listed in your try catch block? Can you tell us/show us what error you are getting?
Also, how are you executing the application?


GenRocket - Experts at Building Test Data
kimi lynn
Greenhorn

Joined: Jun 02, 2003
Posts: 27
I was trying to check if the driver is configured well and working.since the jar file of the driver could'nt find the class path, it has throwed me the error.its working fine, got to write some applications and test it
Thanks for all your time
[ January 28, 2004: Message edited by: kimi lynn ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC driver error