db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: Hanging around derby.log, how to center it?
Date Mon, 29 Mar 2010 14:11:13 GMT
On 03/29/10 11:42 AM, Gabriele Kahlout wrote:
> So On the first connection to derby I must create in the
> derby.system.home a derby.properties that tell's it to change its
> derby.system.home to dir, so that there it finds another
> derby.properties with the properties I want? And I must do that for
> every connection/boot.

No, you can't set derby.system.home in derby.properties, see

You'll have to set derby.system.home as a system property before you
load the Derby driver, each time you run the application, if you're not
happy with the default.

> The idea is that I don't want to write in the user working directory
> (the default for derby.system.home) any .properties or .log file, but
> rather in my dir.
> How would you achieve this?

Either run the application like this:

    java -Dderby.system.home=/path/to/mydir MyApp

or add this call to your application before it loads the Derby driver:

    System.setProperty("derby.system.home", "/path/to/mydir");

Knut Anders

View raw message