• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FTP from Unix Server using Java Program

 
Vaibhav G Garg
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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/
 
Nam Ha Minh
Ranch Hand
Posts: 504
Eclipse IDE Firefox Browser Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic