Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 78046 invoked from network); 6 Nov 2007 20:38:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Nov 2007 20:38:40 -0000 Received: (qmail 48796 invoked by uid 500); 6 Nov 2007 20:38:26 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 48731 invoked by uid 500); 6 Nov 2007 20:38:26 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 48722 invoked by uid 99); 6 Nov 2007 20:38:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2007 12:38:26 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [212.227.126.174] (HELO moutng.kundenserver.de) (212.227.126.174) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2007 20:38:28 +0000 Received: from [192.168.178.20] (p5B09ABDF.dip0.t-ipconnect.de [91.9.171.223]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1IpVBW15pa-000523; Tue, 06 Nov 2007 21:38:06 +0100 Message-ID: <4730D0A8.7020605@oliver-heger.de> Date: Tue, 06 Nov 2007 21:38:00 +0100 From: Oliver Heger User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: Jakarta Commons Developers List Subject: Re: PropertiesConfiguration: about properties referencing other properties References: <13604116.post@talk.nabble.com> <13604646.post@talk.nabble.com> In-Reply-To: <13604646.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX19a5LpvKJFyBNvi9kPOobTUn7X9UB9irba/+oC CR1PsIPbgR5d+rz7Z9uERRm2yZi/cpj6pxKqjszLsBV/0w2t6E xGHnmkkJM0mq2JsuaEz2A== X-Virus-Checked: Checked by ClamAV on apache.org nocturna_gr wrote: > Sorry, i forgot the RES_DIR line... Now i have changed it, but there was a > RES_DIR defined upon BASE_DIR, that is: > BASE_DIR=C:/Documents and Settings/paxosk/Desktop/projects/SQOSS/src/ > RES_DIR=${BASE_DIR}some/path > LOG_MAIL_FILE=${RES_DIR}resources/logs/MailInserter.txt The getProperty() method you are using is intended for low-level access to properties. It returns the "raw" property value without doing any interpolation. Try getString() instead. This method will resolve your variable. Oliver > > > > nocturna_gr wrote: >> Hi, >> i have this properies file: >> BASE_DIR=C:/Documents and Settings/paxosk/Desktop/projects/SQOSS/src/ >> LOG_MAIL_FILE=${RES_DIR}resources/logs/MailInserter.txt >> >> and this code: >> public static void main(String[] args) throws Exception >> { >> PropertiesConfiguration conf=new PropertiesConfiguration(); >> conf.load(new FileInputStream("C:/Documents and >> Settings/paxosk/Desktop/projects/SQOSS/src/resources/all.properties")); >> System.err.println((String)conf.getProperty("LOG_MAIL_FILE")); >> } >> >> The problem is that it prints: >> ${RES_DIR}resources/logs/MailInserter.txt, without parsing the RES_DIR... >> How can i fix that? >> >> Thanks >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org