• 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 using java

 
Ranch Hand
Posts: 93
Eclipse IDE VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Folks,

I need to transfer file from one computer to another in the LAN. I saw some documents on FTP, can you let me how can i approach this problem? Do i need to write both client and server for this? I think if i start with a simple code that replicates file transfer using command line ( filetransfer.java C:\\test.txt [IP of the destination machine]), that would be a good start for me.

Thanks
Adi
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Who says you have to do it in Java? And why?

It's extremely unlikely that you would have to write the server in Java. If somebody says they're going to use FTP then it's extremely likely that they have an FTP server running already. Or if they don't have one, then there's one which came with their computer which they can just start up. So before you start rushing off to do something, find out what exactly you have to do and what you don't have to do.
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Too difficult a question for "beginning". Moving. Maybe Java™ in General, maybe General computing . . . not sure, but let's try general computing.
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Aditya Sirohi wrote:Hello Folks,

I need to transfer file from one computer to another in the LAN. I saw some documents on FTP, can you let me how can i approach this problem? Do i need to write both client and server for this? I think if i start with a simple code that replicates file transfer using command line ( filetransfer.java C:\\test.txt [IP of the destination machine]), that would be a good start for me.

Thanks
Adi


Depends. Assuming server = source and client = destination, does the client trigger the FTP? i.e. Is it a pull mechanism? Or a push where server FTP-s without any request from the client.
In the former case, you need to write both client and server. In the latter case, only server.
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would be inclined to use a 3rd part tool/lib. so Apache Commons Net if you're going to do it programatically.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic