Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC driver error

 
kimi lynn
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
kimi lynn
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic