I have set of DB connection statements in my java file which takes the driver name, url, username and password from my property file and then try to make a connection. But I am keep getting error exactly in this try block . My code is
try {
Class.forName(properties.getProperty("DB2.database.driver"));
} catch (Exception e) {
System.err.println("Unable to locate database driver:" + e);
return null;
}
The error message is
Unable to locate database `driver:java.lang.ClassNotFoundException:
May i know why it is keep getting this error?