alaslipknot
alaslipknot

Reputation: 39

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

Upvotes: 0

Views: 558

Answers (1)

Sqeezer
Sqeezer

Reputation: 1277

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

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

See the examples.

Upvotes: 1

Related Questions