Eu peguei um exemplo da internet para me conectar com o MySQL
private static final String USUARIO = "root";
private static final String SENHA = "123456";
private static final String URL = "jdbc:mysql://127.0.0.1:3306/aulas";
private static final String DRIVER = "com.mysql.jdbc.Driver";
public static Connection abrir() throws Exception
{
Class.forName(DRIVER);
Connection conn = DriverManager.getConnection(URL, USUARIO, SENHA);
System.out.println("Conectado");
return conn;
}
E acontece esse erro
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at Default.Main.abrir(Main.java:52)
at Default.Main.<init>(Main.java:64)
at Default.Main.main(Main.java:36)
Como eu posso arrumar isso ??
EDIT
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="lib" path="mysql-connector-java-5.1.39.zip"/>
<classpathentry kind="output" path="bin"/>