aspose file tools*
The moose likes Java in General and the fly likes what java API handles ftp download/uplaod ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "what java API handles ftp download/uplaod ?" Watch "what java API handles ftp download/uplaod ?" New topic
Author

what java API handles ftp download/uplaod ?

Ian Yang
Ranch Hand

Joined: Nov 27, 2001
Posts: 44
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

Joined: Jul 11, 2001
Posts: 14112
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?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
mike zhang
Ranch Hand

Joined: Feb 26, 2002
Posts: 59
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

Joined: Feb 26, 2002
Posts: 59
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

Joined: Feb 18, 2002
Posts: 48
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what java API handles ftp download/uplaod ?