× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



David,

Thanks for the insight.  I am using Java to transfer a data/text file to one
of our vendors.  I thought it would be slick to use Ant in order to
accomplish this.  I could do as you suggested and use the Commons Net
directly.  Do you think this is a better approach?  If so, do you know where
I could find some good examples?  It does not appear difficult, but I just
like to make sure I am doing it right.  

Thank you for the help.
Chad


-----Original Message-----
From: David Morris [mailto:David.Morris@xxxxxxxxxxxxx] 
Sent: Wednesday, September 01, 2004 12:16 PM
To: java400-l@xxxxxxxxxxxx
Subject: Re: Using Ant within Java

Chad,

You can call the main method in Ant or use the Ant launcher. The
biggest difference I have noticed is in the way classes are loaded. I
assume you are using Java, but if you are using RPG I can point you to
an example. There was/is? a bug in Ant's FTP task when talking to the
iSeries. I posted a patch a couple of years ago to the Commons list that
controls the Net project that Ant uses for FTP support. I am not sure
whether they ever applied it. Basically, Ant did not set the list used
for directories to the verbose mode on the iSeries, which caused it to
think the user was the file or something along those lines.

There are several alternatives to Ant for FTP in Java. If you skip Ant,
you will have much better access to messages, etc. You could use Jakarta
Commons Net directly or another one of several open source packages. I
have used five or six different Java FTP clients -- some free, some not
and they each have strengths and weaknesses. What are you trying to
accomplish?

David Morris

>>> chad.cornelius@xxxxxxxxxxxxxxxxxxxx 9/1/2004 10:56:51 AM >>>
Does anyone have some examples of how Ant can be used within a Java
program?
I have created a build.xml file that will FTP specific files.  I would
like
to use ant within the program to call the build.xml file.

 

Thanks,

Chad
--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.