db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: Configuration
Date Thu, 19 Mar 2009 12:44:14 GMT
Fernando Freitas wrote:
> Hello again,
> 
>   somebody knows?
> 
> 1) How could I use some file xml or another configuration file configure 
> the database, like to choose the place that I will create my Database's 
> instance.?

Hi Fernando,

You could set the Java system property derby.system.home, or use an 
absolute path. I don't remember for sure, but I think you have to set 
derby.system.properties before you load the Derby driver.

> 
> 2) Where Derby save your files of database.?

That depends.
If you have specified derby.system.home it will be saved relative to 
that directory.
If you haven't specified the property, it will be saved relative to the 
current working directory.
If you specify an absolute path for your database, it will be saved 
there. For instance, 'jdbc:derby:/tmp/myDB;create=true' would be created 
under /tmp. If you set derby.system.home to '/home/myself/databases' and 
do 'jdbc:derby:myDB;create=true', the database will be saved under 
/home/myself/databases.

I don't know Eclipse, but in NetBeans the current working directory will 
typically be /home/user/NetBeansProjects/MyProject I think.


HTH,
-- 
Kristian

> 
> Thanks and Best Regards
> Fernando


Mime
View raw message