Yes, of course, you're likely using the wrong driver class.
net.ucanaccess.jdbc.UCanLoadDriver is useful, in general, when you want to delegate the jars loading to ucanaccess to avoid version conflict issues with libraries(the dependecies) already in use with your application. In this case ucanaccess will use a dedicated classloader but you have to set UCANACCESS_HOME system variable(e.g., in OpenOffice, LibreOffice) to communicating where are the jars to load in isolation.. E.g., see here the Gord answer: http://askubuntu.com/questions/187389/is-it-possible-to-open-an-access-2010-database-file-without-using-wine-or-virtua
Also in this case you have to put in your classpath just the ucanload.jar.
Otherwise, If this is not the case you don't have to use the ucanload.jar, but follow the classic set-up. See here: http://stackoverflow.com/questions/21955256/manipulating-an-access-database-from-java-without-odbc
or the ucanaccess web site. As yo can see in this other case the driver class is net.ucanaccess.jdbc.UcanaccessDriver (but you don't need the Class.forName call with java 7 or 8) and you have to put the ucanaccess.jar and all the dependencies (4 jars) in your classpath.
If you still have some trouble, please let me know.
Last edit: Marco Amadei 2015-11-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can anyone help me with this message? I've searched the web and these discussions. I''d like to fnd an example that works.
Thanks,
Jim...
package ucanaccess;
import java.sql.*;
import java.io.File;
import java.io.IOException;
//imports from Jackcess Encrypt
//import com.healthmarketscience.jackcess.CryptCodecProvider;
import com.healthmarketscience.jackcess.Database;
import net.ucanaccess.jdbc.*; // JackcessOpenerInterface;
public class UCanAccessRead {
}
Yes, of course, you're likely using the wrong driver class.
net.ucanaccess.jdbc.UCanLoadDriver is useful, in general, when you want to delegate the jars loading to ucanaccess to avoid version conflict issues with libraries(the dependecies) already in use with your application. In this case ucanaccess will use a dedicated classloader but you have to set UCANACCESS_HOME system variable(e.g., in OpenOffice, LibreOffice) to communicating where are the jars to load in isolation.. E.g., see here the Gord answer:
http://askubuntu.com/questions/187389/is-it-possible-to-open-an-access-2010-database-file-without-using-wine-or-virtua
Also in this case you have to put in your classpath just the ucanload.jar.
Otherwise, If this is not the case you don't have to use the ucanload.jar, but follow the classic set-up. See here:
http://stackoverflow.com/questions/21955256/manipulating-an-access-database-from-java-without-odbc
or the ucanaccess web site. As yo can see in this other case the driver class is net.ucanaccess.jdbc.UcanaccessDriver (but you don't need the Class.forName call with java 7 or 8) and you have to put the ucanaccess.jar and all the dependencies (4 jars) in your classpath.
If you still have some trouble, please let me know.
Last edit: Marco Amadei 2015-11-15