• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDBC driver error

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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");
}
}
}
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic