Change path for urls2.xml file


I am using ObjectDB embedded and have set my home path in relation to the JAR, but running the program still creates objectdb/urls2.xml in my system user folder.

Is there a setting to change the creation path of this file?

I assumed it would be in relation to the home path, similar to the db and log files.


This file is created in a directory .objectdb under the user home directory (regardless of the ObjectDB home path).

You can change the user home directory by changing a Java system property:

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Thanks, that's what I was looking for.



Isn't there any other way how to change location of urls2.xml? We use user.home for different purposes and we do not want directory polluted with objectdb's files. Can't we just change it somehow in objectdb's configuration file, without changing system properties? Thank you.




This file is always written to the user.home directory.

But you can disable it by specifying 0 as the maximum history list size:

    <url-history size="0" user="true" password="true" />

The url history is used to enable opening recent database files in the Explorer. Your end users probably don't need that feature. Disabling it could also save I/O operations when opening databases.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login