[prev in list] [next in list] [prev in thread] [next in thread]
List: ant-user
Subject: RE: Passing file list to a java program
From: tsmets () netscape ! net (Thomas Lionel SMETS)
Date: 2003-09-30 12:38:43
[Download RAW message or body]
Tx very much Jan
I must have forgotten or missed that one !
Out the scope this Thread...
I find it a bit painfull to have to deal with those ! ! !
I already need to work on Zindozs & I get those for freee !
May be usefull in the long run to simplify that ? ! ?
\T,
Jan.Materne@rzf.fin-nrw.de wrote:
>Little test gave me that:
>
><project>
>
> <fileset id="fs" dir="." excludes="Print*,build.xml"/>
>
> <pathconvert property="fs.value" refid="fs"
> pathsep="" ""
> />
>
> <echo>XXX${fs.value}XXX</echo>
> <java classname="Print">
> <arg line=""${fs.value}""/>
> </java>
>
></project>
>
>
>public class Print {
> public static void main(String[] args) {
> for(int i=0; i<args.length; i++) System.out.println("["+i+"] " +
>args[i]);
> }
>}
>
>
>The trick is the double-quote :-)
>
>
>
>Jan
>
>
>
>> -----Original Message-----
>> From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
>> Sent: Tuesday, September 30, 2003 1:12 PM
>> To: user@ant.apache.org
>> Subject: RE: Passing file list to a java program
>>
>>
>> I thought you could to some like
>> myapp -filelist file.list
>> and the app will parse "file.list" ...
>>
>>
>> Jan
>>
>> > -----Original Message-----
>> > From: tsmets@netscape.net [mailto:tsmets@netscape.net]
>> > Sent: Tuesday, September 30, 2003 1:10 PM
>> > To: user@ant.apache.org
>> > Subject: RE: Passing file list to a java program
>> >
>> >
>> >
>> > Jan,
>> >
>> > I don't think I fully understand what your proposal is ... ?
>> > I believe the answer is "NO" !
>> >
>> >
>> > The application expects the array of Strings given to the
>> > "public static void main"
>> > to be filled with the file names to be processed.
>> >
>> > I can't do with want ONE file containing the file names
>> > (I am not the owner of the application, hence I can't change
>> > the code).
>> >
>> > \T,
>> >
>> >
>> > Jan.Materne@rzf.fin-nrw.de wrote:
>> >
>> > >Something different: can that application take a file with
>> filenames?
>> > >Something like <zip includesfile=""/>?
>> > >
>> > >Then you could create that file very easily with <pathconvert
>> > >pathsep="${line.separator}"/>
>> > >and <echo file=""/>.
>> > >
>> > >
>> > >Jan
>> > >
>> > >
>> > >> -----Original Message-----
>> > >> From: tsmets@netscape.net [mailto:tsmets@netscape.net]
>> > >> Sent: Tuesday, September 30, 2003 12:37 PM
>> > >> To: user@ant.apache.org
>> > >> Subject: Re: Passing file list to a java program
>> > >>
>> > >>
>> > >>
>> > >> Yes but then the fact that I have to work on W2K with spaces
>> > >> in the directories makes the task disply this :
>> > >> [java] 0 : C:\Program
>> > >> [java] 1 : Files\IBM\Application
>> > >> [java] 2 : Developer\workspace\UseCase1\part
>> > >> [java] 3 : A\UC1_CreateDSLAM_24-9-03-7pm.ilr
>> > >> [java] 4 : C:\Program
>> > >> [java] 5 : Files\IBM\Application
>> > >> [java] 6 : Developer\workspace\UseCase1\part
>> > >> [java] 7 : A\UC1_CreateDSLAM_25-9-03-10pm.ilr
>> > >> [java] 8 : C:\Program
>> > >> [java] 9 : Files\IBM\Application
>> > >> [java] 10 : Developer\workspace\UseCase1\part
>> > >> [java] 11 : B\UC1_CreateCard_CBRForCT-24-9-03-11pm.ilr
>> > >>
>> > >> The java program is currently a simple piece of code
>> > >> displaying what I receive !
>> > >>
>> > >> \T,
>> > >>
>> > >>
>> > >> Stefan Bodewig <bodewig@apache.org> wrote:
>> > >>
>> > >> >On Tue, 30 Sep 2003, Thomas SMETS <tsmets@netscape.net> wrote:
>> > >> >
>> > >> >> If my FileSet contains 3 files, I need 3 arguments ...
>> > >> >
>> > >> >OK, so the line attribute may be what you want.
>> > >> >
>> > >> >What should they be separated by? Why do you need quotes?
>> > >> >
>> > >> >Stefan
>> > >> >
>> > >> >
>> > >>
>> > >>
>> > >> --
>> > >>
>> > >> Thomas SMETS
>> > >> rue J. Wytsmanstraat 62
>> > >> 1050 Brussels
>> > >>
>> > >>
>> >
>> >
>> >
>> > --
>> >
>> > Thomas SMETS
>> > rue J. Wytsmanstraat 62
>> > 1050 Brussels
>> >
>> >
>> > __________________________________________________________________
>> > McAfee VirusScan Online from the Netscape Network.
>> > Comprehensive protection for your entire computer. Get your
>> > free trial today!
>> > http://channels.netscape.com/ns/computing/mcafee/index.jsp?pro
>> mo=393397
>>
>> Get AOL Instant Messenger 5.1 free of charge. Download Now!
>> http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>
--
Thomas SMETS
rue J. Wytsmanstraat 62
1050 Brussels
__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
Get AOL Instant Messenger 5.1 free of charge. Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic