Java 无法使用启用身份验证的DriverManager.getConnection(url、属性)连接到Derby

Java 无法使用启用身份验证的DriverManager.getConnection(url、属性)连接到Derby,java,derby,Java,Derby,我启动了Derby网络服务器,并能够使用以下两种方法连接它: DriverManager.getConnection("jdbc:derby://192.168.1.1:1527//opt/db", "user", "password"); 及 但是,我无法使用以下连接: Properties props = new Properties(); props.put("user", "user"); props.put("password", "password"); DriverManager

我启动了Derby网络服务器,并能够使用以下两种方法连接它:

DriverManager.getConnection("jdbc:derby://192.168.1.1:1527//opt/db", "user", "password");

但是,我无法使用以下连接:

Properties props = new Properties();
props.put("user", "user");
props.put("password", "password");
DriverManager.getConnection("jdbc:derby://192.168.1.1:1527//opt/db", props);

有什么我遗漏的吗?或者Derby不支持第三种方法?

第三种方法工作正常,以前一定是打字错误。很抱歉。

您收到的错误消息是什么?
Properties props = new Properties();
props.put("user", "user");
props.put("password", "password");
DriverManager.getConnection("jdbc:derby://192.168.1.1:1527//opt/db", props);