javadb - java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/Employees1 -
i researched on problem did not find solution.
following code:
package database_console; import java.sql.connection; import java.sql.drivermanager; import java.sql.sqlexception; /** * * @author superpc */ public class dbconnect { /** * @param args command line arguments */ public static void main(string[] args) { // todo code application logic here try{ connection con=drivermanager.getconnection("jdbc:derby://localhost:1527/employees1","admin1","admin"); } catch(sqlexception err){ system.out.println(err); } }
}
when run code following
error: java.sql.sqlexception: no suitable driver found jdbc:derby://localhost:1527/employees1
please guide me why error coming , how can fix this.
waiting replies.
thanks
check for:
derbyclient.jar on class path.
loading driver class by
class.forname("org.apache.derby.jdbc.clientdriver");
Comments
Post a Comment