Hello,
I just downloaded ucanaccess. I'm facing a problem with the connection to Access 2007.
I use Java 8, Eclipse, and I have followed the instruction on this webpage: http://stackoverflow.com/questions/21955256/manipulating-an-access-database-from-java-without-odbc?lq=1
What I've done is:
1, Downloaded ucanaccess with 5 .jar files
UCanAccess (ucanaccess-2.x.x.jar)
HSQLDB (hsqldb.jar, version 2.2.5 or newer)
Jackcess (jackcess-2.x.x.jar)
commons-lang (commons-lang-2.4.jar, or newer)
commons-logging (commons-logging-1.0.4.jar, or newer)
2, Put the .jar files above into my project's folder and added into library(Eclipse->window->Java->User Libraries->Add External JARs).
3, Import java.sql.*;
java.lang.ClassNotFoundException: net.ucanaccess.jdbc.UcanaccessDriver
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 WebRequest.main(WebRequest.java:11)
It seems that the class of the driver is not found. But it is supposed to be in the 5 .jars I downloaded...
I've been working on this for a long time. Please help me with this. Any of your suggestions are appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I just downloaded ucanaccess. I'm facing a problem with the connection to Access 2007.
I use Java 8, Eclipse, and I have followed the instruction on this webpage:
http://stackoverflow.com/questions/21955256/manipulating-an-access-database-from-java-without-odbc?lq=1
What I've done is:
1, Downloaded ucanaccess with 5 .jar files
UCanAccess (ucanaccess-2.x.x.jar)
HSQLDB (hsqldb.jar, version 2.2.5 or newer)
Jackcess (jackcess-2.x.x.jar)
commons-lang (commons-lang-2.4.jar, or newer)
commons-logging (commons-logging-1.0.4.jar, or newer)
2, Put the .jar files above into my project's folder and added into library(Eclipse->window->Java->User Libraries->Add External JARs).
3, Import java.sql.*;
My code is:
But it returns an exception:
java.lang.ClassNotFoundException: net.ucanaccess.jdbc.UcanaccessDriver
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 WebRequest.main(WebRequest.java:11)
It seems that the class of the driver is not found. But it is supposed to be in the 5 .jars I downloaded...
I've been working on this for a long time. Please help me with this. Any of your suggestions are appreciated.
I just found the problem!!
I did not successfully put the .jars in my referenced library... How stupid I am!
Now it works~~
Nothing stupid.