java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
Posted by: arif
Date: May 09, 2005 09:26PM

i'm a newbie to jdbc and was trying out a basic program to connect to the database.
I have followed the instructuon to copy the mysql-connector-java-3.1.6-bin.jar to C:\Program Files\Java\jdk1.5.0\jre\lib\ext

this is my program :

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class mysqlloaddriver {

private static String URL = "jdbc:odbc:Skynet";
private static Connection conn = null;

public static void main(String[] args) {
try {
conn = DriverManager.getConnection("jdbc:mysql://localhost/test", "root", "password");
catch (ClassNotFoundException CNFE) {
catch (SQLException SQLE) {
catch (Exception E) {

and when compiled, i got this :

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at mysqlloaddriver.main(

please help..., thank you.....

Options: ReplyQuote

Written By
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
May 09, 2005 09:26PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.