• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

FTP from Unix Server using Java Program

 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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/
 
Ranch Hand
Posts: 530
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Do not set lab on fire. Or this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic