简体   繁体   中英

How to create and use and external derby Database

am getting started with Java database development and i wanted to know how to create and use database outside of the Derby server so for example instead of using this as a host url :

 String host = "jdbc:derby://localhost:1527/Employees";

i want to use something like this :

 String host = "jdbc:derby://c:/MyDb/Employees";

i dunno if that is correct or not, but this is what am trying to do cause i don't know how to use the database in the localhost after exporting the executable jar for the application

thank you

If you want to load database from the file system, you use:

String host = "jdbc:derby:c:/MyDb/Employees";

See the examples .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM