I'm trying to make a connection to java directly with jdbc. I inserted in the project the jdbc mysql jar in the project properties, javabuildpath and adding the external jar. I am taking the following example and it seems to me that you can not find the bank.
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class Disciplina {
private int idDisciplina;
private String disciplina;
private float cargaHoraria;
public static void main(String args[]) throws SQLException {
Connection conexao = DriverManager
.getConnection("jdbc:mysql://localhost/ucsal");
System.out.println("Conectado!");
conexao.close();
}
}
Note: I throw an exception, I did not try because I want to see the error. And on the inserted jar, when I go in javabuildpatch, in the tab library, mysql jdbc has nothing inside the library. Everything is none (source target "none", java doc location "none", native library location "none").
I just downloaded the jar, did not download the rest of the contents of the mysql_jdbc.zip folder.