Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 30119 invoked from network); 1 Aug 2004 18:19:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Aug 2004 18:19:08 -0000 Received: (qmail 44044 invoked by uid 500); 1 Aug 2004 18:19:00 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 44016 invoked by uid 500); 1 Aug 2004 18:18:59 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 44000 invoked by uid 99); 1 Aug 2004 18:18:59 -0000 X-ASF-Spam-Status: No, hits=3.2 required=10.0 tests=DNS_FROM_RFC_POST,URIBL_WS_SURBL X-Spam-Check-By: apache.org Received: from [195.225.149.8] (HELO mail8) (195.225.149.8) by apache.org (qpsmtpd/0.27.1) with ESMTP; Sun, 01 Aug 2004 11:18:57 -0700 Received: from dynamic-ip-cr2001187588.cable.net.co ([200.118.75.88] helo=eduardo) by mail8 with asmtp (Exim 4.34) id 1BrKv1-00043P-RA; Sun, 01 Aug 2004 12:18:48 -0600 Message-ID: <001201c477f3$fd46f260$584b76c8@eduardo> Reply-To: =?iso-8859-1?Q?Eduardo_Andr=E9s_Alfonso_Sierra?= From: =?iso-8859-1?Q?Eduardo_Andr=E9s_Alfonso_Sierra?= To: "Ant Users List" , References: <20040801165246.0C5393965@sitemail.everyone.net> Subject: Re: Reading and Writing of String Date: Sun, 1 Aug 2004 13:18:43 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I would do it like this (however, other solutions must exist and could be better, this is just my way) load the properties file using now you can access the value of you build-date property this way ${build-date} then you can use replaceregexp to change the value of the version_Date variable within the java file This way could work, I think you can easily adapt it to you case. ----- Original Message ----- From: "Pritesh saharey" To: Sent: Sunday, August 01, 2004 11:52 AM Subject: Reading and Writing of String > Hi All, > I need a help regarding reading and writing to a file. There is a file ui.properties which looks something like this > > build-date= AmarGeet_0098_20040812 > > now i want to read this value of variable 'build-date' and write it to a 'String' variable in a java file > > String version_Date=""; > > and this process has to be done before the compliation of java files, is there any way in ant to do this process. > > > so what need to be done here can anybody help me out, I will be thankful to you. > > > > Pritesh Saharey > BE(Mech) > Software Engineer > > > _____________________________________________________________ > Join SQAtester.com Community ---> http://www.sqatester.com/testersarea/joinus.htm > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org