Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-04-2007, 03:53 PM
Senior Member
 
Join Date: Jun 2007
Posts: 164
Rep Power: 3
Heather is on a distinguished road
Default ClassNotFoundException com.mysql.jdbc.Driver
Hi guys, I have a problem when I try to locate for example my mysql connector.
In my class to load the controller the sentence is:
Code:
static final String CONTROL_JDBC = "com.mysql.jdbc.Driver ";
But an exception appears:
Code:
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.db.LoadDB.LoadController(LoadDB.java:19)
thank you

Last edited by Heather; 06-30-2007 at 03:39 PM.
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 06-29-2007, 03:05 PM
Senior Member
 
Join Date: Jun 2007
Posts: 119
Rep Power: 0
Peter is on a distinguished road
Default
Why don't you use netbeans as IDE?, it has a menu where you create your project and add .jar of your controller.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 06-30-2007, 03:42 PM
Senior Member
 
Join Date: Jun 2007
Posts: 130
Rep Power: 0
Jack is on a distinguished road
Default
you must copy the mysql-connector jar file into this two directories:
Code:
< your dir >\jre\lib\
< yourdir >\jre\lib\ext\
If you are using netbeans like your default IDE, restart it after copying this files.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver ljustiniano New To Java 6 02-19-2010 02:57 PM
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver haneeshrawther Advanced Java 0 03-21-2008 02:13 PM
can't register a MySQL driver prfalco New To Java 4 02-04-2008 12:13 AM
mysql driver problem mokingsu Database 4 01-17-2008 06:27 PM
java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver Marcus Database 1 06-27-2007 06:57 PM


All times are GMT +2. The time now is 09:51 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org