You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Fernando Freitas <na...@gmail.com> on 2009/03/19 12:46:04 UTC

Configuration

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.?

2) Where Derby save your files of database.?

Thanks and Best Regards
Fernando

Re: Configuration

Posted by Kristian Waagan <Kr...@Sun.COM>.
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