开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜