views:

19

answers:

1

I want to be able to define the folder where a Derby embedded database will be created after I start my application (which will someday migrate to a web application). The only way I know of setting this folder is by setting the derby.system.home system property -- but this property is read at JVM start-time, and is never refreshed (see reference)

Is there any work-around that does not involve stopping and restarting the JVM?

+2  A: 

Did you try to specify the path in your Derby URL?

Something like

DriverManager.getConnection("jdbc:derby:/home/viv/mydb");
Vivien Barousse
duh - should have thought of that sooner. Works like a charm.
tucuxi