Greetings I do not know why the connection does not run, it will be for the jackcess
that will be obsolete or for the version of my jdk 1.8? because you already add JAR
UCanAccess
4.0.4 to libraries through netbeans
package Frames;
import java.sql.*;
import javax.swing.*;
import java.sql.DriverManager;
/**
*
* @author
*/
// creando la clase conexion para conectar a la base de datos en Access
public class Conexion {
static Connection conn = null;
static String driver = "net.ucanaccess.jdbc.UcanaccessDriver";
static String url = "jdbc:ucanaccess://C:\xxxx\xxx.accdb";
public static Connection ejecutarConexion(){
try{
if(conn==null){
Class.forName(driver);
conn = DriverManager.getConnection(url);
JOptionPane.showMessageDialog(null, "Conectado");
}
} catch (Exception ex){
ex.printStackTrace();
conn = null;
}
return conn;
}
public static void main(String [] args){
Connection cn= Conexion.ejecutarConexion();
}
}
The error is as follows: