Change path for urls2.xml file

#1

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.

#2

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:

    https://stackoverflow.com/questions/1501235/change-user-home-system-property

ObjectDB Support
#3

Thanks, that's what I was looking for.

#4

Hi,

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.

 

Martin

#5

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

Reply