db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Susan Cline <home4...@pacbell.net>
Subject Fwd: Specifying the Derby Database Location
Date Wed, 01 Feb 2006 18:05:12 GMT
Afkham Azeez <afkham@gmail.com> wrote:  Date: Wed, 1 Feb 2006 11:26:50 +0600
From: Afkham Azeez <afkham@gmail.com>
To: derby-user@db.apache.org
Subject: Specifying the Derby Database Location

  Hi Folks,

I have my derby.properties file in $MY_PROJECT/conf directory. This is
the directory pointed to by the derby.system.home System property. But
no my database is getting created under $MY_PROJECT/conf e.g. as

I need my database to be created as $MY_PROJECT/DATABASE. Is there a
property I can specify in the derby.properties file which will specify
the physical location of the Database?
Thanks in Advance
Afkham Azeez
  Hi Afkham,
 I may be confused what you are trying to achieve - but let me try to 
answer your question.
 If you would like your database to be created under $MY_PROJECT,
 then your derby.system.home property should be set to $MY_PROJECT.

 Also, the location of the derby.properties file must be in  
derby.system.home in order for it to be read.  So if you want  derby.system.home 
to be $MY_PROJECT, then you will need to put your  derby.properties 
file in this directory.
 However, you can connect to your database (or create it) from 
anywhere  on the file system by starting the java application (or ij for 
instance  in the example below) by issuing a command like this:
java -Dderby.system.home=$MY_PROJECT org.apache.derby.tools.ij 
(as long as $MY_PROJECT is set as an environment variable of course.)
Does this answer your question?


View raw message