195 words

Change path for urls2.xml file

#1
2012-08-12 17:39

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.

jb11
jb11's picture
Joined on 2012-08-12
User Post #1
#2
2012-08-12 19:58

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:

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

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,199
#3
2012-08-12 21:51

Thanks, that's what I was looking for.

jb11
jb11's picture
Joined on 2012-08-12
User Post #2
#4
2014-01-27 09:14

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

mha
mha's picture
Joined on 2014-01-27
User Post #1
#5
2014-01-30 14:38

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)
support
support's picture
Joined on 2010-05-03
User Post #1,764

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel