java - No Suitable driver found unless full path used -


when trying connect ms access database using ucanaccess keep getting "no suitable driver found" error when using relative path database:

severe: null java.sql.sqlexception: no suitable driver found jdbc:ucanaccess:patientlog.accdb     @ java.sql.drivermanager.getconnection(drivermanager.java:689)     @ java.sql.drivermanager.getconnection(drivermanager.java:247)     @ connectiontester.opendb.openconnection(opendb.java:33)     @ connectiontester.connectiontester$1.handle(connectiontester.java:41)     @ connectiontester.connectiontester$1.handle(connectiontester.java:37) 

to make sure relative path correct, used directorystream directory list, , database (patientlog.accdb) does show in list. curiously, when use full path error disappears.

anyone know why? have solution can use relative path?

using java 1.8 update 45

netbeans 8.0.2

windows 8

ucanaccess 2.0.9.5 (and dependencies)

the error message shows missing 2 slashes before file name. when specifying relative path connection url should this:

jdbc:ucanaccess://patientlog.accdb 

when specifying full path should use this:

jdbc:ucanaccess://c:/users/gord/desktop/patientlog.accdb 

Comments