The JDBC-ODBC Bridge is no longer included in Java 8 so I tried UCanAccess, but I am having trouble with that. Here is my code:
package jdbc;
import java.sql.*;
public class jdbc
{
Connection con;
Statement st;
jdbc()
{
try
{
con=DriverManager.getConnection("jdbc:ucanaccess://P:/eclipseWorkspace/databases/signup.accdb");
st=con.createStatement();
st.executeUpdate("INSERT INTO signup (firstName,lastName,email,password) VALUES ('rocky','balboa','rocky@gmail.com','pop')");
System.out.println("SUCCESS");
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
class main
{
public static void main(String args[])
{
new jdbc();
}
}
I have included some external jars as shown in the image:
https://i.stack.imgur.com/QMb1q.png
When i run it, it gives me a stack trace with ClassNotFoundException and NoClassDefFound errors as shown here:
https://i.stack.imgur.com/A7kZQ.png
What is wrong with my code?