org.gjt.mm.mysql.Driver -- class not found exception
Posted by: Evgueny Antonoff
Date: July 15, 2005 09:01AM

Hello,

I am not java developer. Just downloaded latest mysql server and connectorJ jdbc driver available. Ran a test program and it reported:

java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver

I do not know if i did something wrong or there is really the error in the driver package...
Please help...

Evgueny



------------------------ THE TEST PROGRAM --------------------------
import java.sql.*;

public class ttttttest {


public static void main ( String [ ] args ) {

Connection c;

// mydatabase is existing database name
// userkane is existing user with apropriate privileges
String name = "userkane";
String pass = "myverysecretpassword";
String url = "jdbc:mysql//127.0.0.1:3306/mydatabase";

try {

System.out.println("connecting to the " + name + " data source...");
Class.forName("org.gjt.mm.mysql.Driver");
//Class.forName("com.mysql.jdbc.Driver");
c = DriverManager.getConnection(url, name, pass);

} //end try

catch( Exception x ) {
x.printStackTrace();

}


} //end main


} //end QueryApp

Options: ReplyQuote


Subject
Written By
Posted
org.gjt.mm.mysql.Driver -- class not found exception
July 15, 2005 09:01AM


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.