0
well I’m with this error in my connection class:
Caused by: java.sql.SQLException: No suitable driver found for jdbc:mysql///helpsemeq
I don’t know which part I got wrong in the code:
package Conexao;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class ConnectionFactory {
public Connection getConnection(){
try{
String nomeUsuario = "root";
String senhaUsuario = "";
String enderecoServidor = "localhost";
String nomeBanco = "helpsemeq";
return DriverManager.getConnection("jdbc:mysql//"+enderecoServidor+
"/"+nomeBanco, nomeUsuario, senhaUsuario);
} catch (SQLException ex){
System.out.println("fail");
throw new RuntimeException(ex);
}
}
}
How is your classpath?
– Victor Stafusa
would be the mysql library?
– Felipe
Probably.
– Victor Stafusa