aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes FTP from Unix Server using Java Program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "FTP from Unix Server using Java Program" Watch "FTP from Unix Server using Java Program" New topic
Author

FTP from Unix Server using Java Program

Vaibhav G Garg
Ranch Hand

Joined: Sep 23, 2011
Posts: 140
Hi,

Please let me know if we can ftp a file placed on a Unix Server using a java program which is running on windows machine.

Steps involved:

1. Connect to unix server
2. Go to the path of the file
3. FTP the file to local windows machine.

Any inputs will be appreciated to start with.

THanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41572
    
  54
That can be easily done. The Apache Commons Net library includes everything you need for a programmatic FTP client: http://commons.apache.org/proper/commons-net/


Ping & DNS - my free Android networking tools app
Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 498

Vaibhav G Garg wrote:Hi,

Please let me know if we can ftp a file placed on a Unix Server using a java program which is running on windows machine.


I think you mean to download files from the FTP server. Like Ulf suggested, we can use Apache Commons Net for FTP programming in Java. Here's an example:

Java FTP file download tutorial and example


PM Me If You Want to get Urgent Help on Java Programming
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: FTP from Unix Server using Java Program