import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
public class Dao {
Connection con;
PreparedStatement pstmt;
public void abrirBanco()throws Exception {
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost:3306/vabteste";
String user = "root";
String password = "123456";
con = DriverManager.getConnection(url, user, password);
}
public void fechaBanco()throws Exception {
if(con != null)
con.close();
if(pstmt != null)
pstmt.close();
}
}
retorna esta mensagem
ERROcom.mysql.jdbc.Driver