File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what java API handles ftp download/uplaod ?

 
Ian Yang
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • 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?
 
mike zhang
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Michael Crutcher
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic