• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

what java API handles ftp download/uplaod ?

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you know what Java API handles the "ftp" type of work like download/upload ? I used to have some Korn shell script do this kind backgroud work, do you know if it is feasible to use java to do it ? will it be much slower ?
Thanks,
Ian
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use http://www.savarese.org/oro/downloads/#NetComponents for ftp access in Java.
Why do you think it would be slower in Java?
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you so much. If you don't mind I would like to ask you another question: what java API can handle those UNIX type commands like --
"uname" -- find machine name
"cp file1 file2";
and so on.
Any resource site ?
Thanks,
Mike
 
mike zhang
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you so much. If you don't mind I would like to ask you another question: what java API can handle those UNIX type commands like --
"uname" -- find machine name
"cp file1 file2";
and so on.
Any resource site ?
Thanks,
Mike
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You basically want to access the command line right? Every jvm is started by a runtime environment and has a reference to that environment.
Runtime rt = Runtime.getRuntime();
Gets a reference to the runtime environment that started the jvm. You can then execute an array of commands with:
rt.exec(cmd[]);
There is, of course, much more complexity than this, but google "java Runtime.exec" and you'll find several articles about this subject.
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
Is a good place to find some of the more common mistakes explained.
Michael Crutcher
 
reply
    Bookmark Topic Watch Topic
  • New Topic