Error creating class: com.mysql.jdbc.Driver

L

leo

I'm using netbeans4.0 IDE for a mySQL jbdc application. Within
netbeans the application works fine, I can connect, read and write to
the db. However when I run from the jar directly I get "Error creating
class: com.mysql.jdbc.Driver" when I try to create the driver using
Class.forName("com.mysql.jdbc.Driver");

I did put mysql-connector-java-3.1.6-bin.jar in the classpath for
compiling sources. Also when running from the command line prompt I've
added the -classpath including the full directory and name of the
connector jar file. Still doesn't work. What am I doing wrong?


leo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top