Java with FTP and threads

Go To StackoverFlow.com

-1

I want a Java class to download files from a Windows machine to a Unix server, and upload files from Unix server to Windows machine using FTP. Both jobs should run synchronously to perform these tasks.I assume here I need two threads.

Could anyone post sample code to perform the above tasks, please?

2012-04-04 22:57
by Raj
@Alonso: i am trying this http://www.unicott.com/java-simple-ftp-connection-example-with-commo,if you have any better approaches. i am not asking complte code write it for me : - Raj 2012-04-04 23:10
sorry Raju, but that link didn't work, try to copy & paste some code that you are actually working with, you can edit your post and you will find instructions how to format it in a way that can be understandable... and if you do so I'll remove my downvote ; - Alonso Dominguez 2012-04-04 23:16


2

I suggest the Apache Commons Net library.

2012-04-04 22:58
by Max
Do you have any approach to solve this problem.Any sample code really helps me - Raj 2012-04-04 23:01
+1 for Commons Net - good library. @Raju - umm, the example is right there on the page Max provided you. Heck, it's even called "FTPClientExample.java - Will Chesterfield 2012-04-04 23:17
Ads