Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automate FTP Process in Java language

Status
Not open for further replies.

cindyc

Programmer
May 3, 2000
2
US
I am having trouble finding ways to automate FTP process in Java language (userid:anonymous,password:email).&nbsp;&nbsp;What function do I used to execute remote commands (GET, PUT, CD and etc)?&nbsp;&nbsp;I am using IBM AIX Windows system.<br><br>An example of the Java program would be very much appreciated!&nbsp;&nbsp;<br>&nbsp;<br>&nbsp;<br><br><br>
 
Dear cindyc,<br><br>Your question might be a bit to broad. One thing I see that I think I can help with is this:<br><br>&gt; What function do I used to execute remote commands (GET, &gt; PUT, CD and etc)?<br><br><br>As far as I am aware the SDK does not contain any tools related to FTP other than the java.net package with sockets etc.<br><br>Their are 3rd party tools that will supply this functionality like the Symantec API. This makes the API specific to the library that you decide to use and only someone familiar with it can help you.<br><br>If you want to build your application using sockets here are some things to keep in mind.<br><br>The FTP protocols are not statless like HTTP. When working with an FTP counterpart (client or server) you must maintain the state of your conversation and know how to respond to the various messages according to the task at hand. <br><br>The second aspect that is more difficult than HTTP is that FTP uses two socket connections. The first or PRIMARY connection is used to communicate between the client and server applications, i.e., request/response. The second socket connection is used to transfer the directory listings and files.<br><br>Perhaps I misread your post but it seems that you have a slightly errored view of how FTP works from a development standpoint. If I have I appologize and wish you luck.<br><br>-pete<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top