Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

Reading data from a file using Ant

Thread view: 
rynox - 16 Nov 2005 06:40 GMT
Hi Everyone,

Im new to Ant and I am encountering some problems.
I have a text file which contains a value in there. I need that value
to be set into another file.
I tried using Javascript but Javascript does not support I/O for files.
Is there any command in Ant that can read a value from a text file (
eg. output.txt ) and then use that value to replace into another file (
eg. jsp ).

Thanks,
Marvin
Roedy Green - 16 Nov 2005 10:12 GMT
>Im new to Ant and I am encountering some problems.
>I have a text file which contains a value in there. I need that value
[quoted text clipped - 3 lines]
>eg. output.txt ) and then use that value to replace into another file (
>eg. jsp ).

see http://mindprod.com/jgloss/multiposting.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

rynox - 17 Nov 2005 01:56 GMT
There dont seem to be any syntax that shows how i can retrieve a value.
Roedy Green - 17 Nov 2005 02:51 GMT
>There dont seem to be any syntax that shows how i can retrieve a value.

Want you want is a way to read a small amount of text from a file and
put it into an ANT property?

Look at the LOADFILE task.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.