Java File Transfer


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Java File Transfer

  1. #1
    Join Date
    Aug 2005
    Posts
    1

    Java File Transfer

    Iam a novice to java programming. I have to access a remote system in my LAN and transfer a CSV file from that machine to my system.
    Also since that file is big I have to split it into small files of 1000 lines each and move it to my system.I have to use FTP to do it. I should have an option to give the file location in my program so that i can dynamically change it according to the changes in the actual file location in the remote machine.
    How can i accomplish this using java? Can anyone offer any help on this?
    We are using Tomcat server on our network.
    Thank u
    Vidya

  2. #2
    Join Date
    Jul 2005
    Location
    SW MO, USA
    Posts
    299
    First you should become familiar with how to use FTP. Read the doc on how to use it and use it a few times manually to see how it goes. Also get RFC 959 which describes FTP.
    If your program is expected to be an FTP client and issue use the FTP protocol to communicate with the server, you'll want to look at using Sockets. Perhaps there are higher level classes that will do more of the work, otherwise you'll need to write them yourself.
    Firstly write a simple FTP client that can get a small file from the server and copy it to your harddrive, then move to the more complex requirements.

    Norm

  3. #3
    Join Date
    Jul 2005
    Posts
    4
    Why re-invent the wheel and write a FTP client ?
    Just download an already existing FTP module .. for instance..Apache common's tool jar from..

    http://jakarta.apache.org/commons/net/

    Add it to the classpath and use it in your program.It is as simple as invoking sendFiles() and getFiles() on the FTPClient class in the library.
    Last edited by ramper; 08-11-2005 at 04:22 PM.

Similar Threads

  1. Replies: 8
    Last Post: 11-27-2008, 03:13 AM
  2. ANN: Catalyst File Transfer V4.0
    By Catalyst Development Corporation in forum vb.announcements
    Replies: 0
    Last Post: 01-07-2003, 11:58 AM
  3. .NET vs. Enterprise Java: Who's Got Better Security?
    By Glen Kunene in forum Talk to the Editors
    Replies: 17
    Last Post: 03-23-2002, 01:43 AM
  4. Java Security in File access
    By TA in forum Java
    Replies: 0
    Last Post: 09-01-2000, 09:36 AM
  5. Re: VB vs. Visual Age for Java
    By JJ in forum Enterprise
    Replies: 1
    Last Post: 07-06-2000, 05:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center