commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Pugh" <>
Subject [configuration] RE: Commons/Config
Date Sat, 09 Oct 2004 11:17:44 GMT
MessageHi Mark..  You should send these to the mailing list, as you can then
have exposure to your question by lots of experts, and everybody can learn!
I am CC the list back.

First off, check out the RC2, that has many many fixes.  And 1.0 is expected
as soon as Henning has a chance to cut it.   For your problem, I think
everythign is relative to the working directory.  So, what you can do is set
up your file name as ../config/

This will get around your initial issue.  I think the idea would always be
to run relative from your working directory unless you provided a full path.
Also, the latest version in CVS, which will be 1.0 Real Soon Now has a bunch
of much better path resolution code, applied in a more global manner.

  -----Original Message-----
  From: Mark.Woodman []
  Sent: Saturday, October 09, 2004 2:19 AM
  Subject: RE: Commons/Config


  I haven't seen any documentation that answers this question, so I was
hoping you might be able to help.

  Is there a way to have a configuration file specify that internal
resources should be found relative to the location of itself, rather than
relative to the location of the working directory?

  The build we have of the config package (August 11) seems to always use
the latter.   If the working directory doesn't contain the config file we're
using, we're up the proverbial creek.

  For example, lets say the working directory is:

  And the config files live here:

  And the contents of config_main.xml is:
          <properties fileName=""/>
          <properties fileName=""/>

  When I try to load config_main.xml (and the working directory is
  the ConfigurationFactory tries to find /app/bin/
  and promptly throws an Exception.

  This seems to be a show-stopper for us.  Is this expected behavior, or has
it changed since August, or is there a way to tell the configuration to use
paths relative to the config file?

  Thanks for your help,


  Mark Woodman      719.234.0670
  Intelligent Software Solutions

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message