Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我开始使用 Java 数据库开发,我想知道如何在 Derby 服务器之外创建和使用数据库,例如,而不是将其用作主机 url:
String host = "jdbc:derby://localhost:1527/Employees";
我想使用这样的东西:
String host = "jdbc:derby://c:/MyDb/Employees";
我不知道这是否正确,但这是我正在尝试做的,因为在导出应用程序的可执行 jar 后,我不知道如何使用本地主机中的数据库
谢谢你
如果要从文件系统加载数据库,请使用:
String host = "jdbc:derby:c:/MyDb/Employees";
请参阅示例。