我收到此异常
找不到合适的驱动程序
jdbc:derby://localhost:1527/Test [saad on SAAD]
Connection con=DriverManager.getConnection("jdbc:derby://localhost:1527/Test [saad on SAAD]");
答案 0 :(得分:1)
在此之前
Connection con=DriverManager.getConnection("jdbc:derby://localhost:1527/Test [saad on SAAD]", dbusername, dbpassword); // default username = "root" , default password = ""
你必须写这个
Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
但首先,您必须为apache derby导入驱动程序jar