开发者

Specify at run-time where to create or open Derby embedded database

开发者 https://www.devze.com 2023-01-13 16:38 出处:网络
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 th

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?


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

Something like

DriverManager.getConnection("jdbc:derby:/home/viv/mydb");
0

精彩评论

暂无评论...
验证码 换一张
取 消