 <p>Your problem can be solved by following these steps</p> <p>Step 1:<br/>Add these two packages to your project (jackcess-encrypt.jar, bcprov-jdk15on-152.jar)</p> <p>You can download the two packages from the following links:</p> <p><a href="http://jackcessencrypt.sourceforge.net/" rel="nofollow noreferrer">Jackcess Encrypt</a><br> <a href="http://www.bouncycastle.org/java.html" rel="nofollow noreferrer">Bouncy Castle</a></p> <p>Step 2:<br/>You have to add this class to your project folder</p> <pre><code>import java.io.File; import java.io.IOException; import net.ucanaccess.jdbc.JackcessOpenerInterface; import com.healthmarketscience.jackcess.CryptCodecProvider; import com.healthmarketscience.jackcess.Database; import com.healthmarketscience.jackcess.DatabaseBuilder; public class CryptCodecOpener implements JackcessOpenerInterface { @Override public Database open(File fl,String pwd) throws IOException { DatabaseBuilder dbd =new DatabaseBuilder(fl); dbd.setAutoSync(false); dbd.setCodecProvider(new CryptCodecProvider(pwd)); dbd.setReadOnly(false); return dbd.open(); } //Notice that the parameter setting autosync =true is recommended with UCanAccess for performance reasons. //UCanAccess flushes the updates to disk at transaction end. //For more details about autosync parameter (and related tradeoff), see the Jackcess documentation. } </code></pre> <p>like this</p> <p><a href="https://i.stack.imgur.com/cXZXQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cXZXQ.png" alt="enter image description here"></a></p> <p>step 3:<br/>use the following connection code</p> <pre><code>public void connectToDB(){ try { conn = DriverManager.getConnection("jdbc:ucanaccess://words.accdb;jackcessOpener=CryptCodecOpener", "user", "pass"); } catch (SQLException ex) { ex.printStackTrace(); } } </code></pre> <p>be careful <br/>-change words.accdb to the name of your Access database<br/>-the "user" can be empty or username of your computer or something else <br/>-the "pass" must be the password of your Access file.</p>