user2033700
user2033700

Reputation: 5

JDBC can't be found in Eclipse

public static boolean startDriver(){
try{
Class.forName("com.mydql.jdbc.Driver");
System.out.println("Loaded MySQL driver!");
}catch(ClassNotFoundException e){
System.out.println("Failed to start MySQL driver! JDBC not found!");
return false;
}
return true;
}

I'm trying to use JDBC with my Java project but I keep receiving a ClassNotFoundException. I have referenced the mysql_connector.jar that I downloaded from the MySQL website and tried everything! It's in my >Referenced Libraries folder but I still keep getting the error!

Upvotes: 0

Views: 84

Answers (1)

Thorn G
Thorn G

Reputation: 12776

Class.forName("com.my**d**ql.jdbc.Driver"); Ought to be Class.forName("com.mysql.jdbc.Driver");

Upvotes: 4

Related Questions