Christopher Mahan
Christopher Mahan

Reputation: 7619

copy files from one solaris 9 to another using java

How to copy file(s) from one solaris 9 machine to another solaris 9 machine using only java?

We have ssh access to both machines. The java program will run on one of those two machines.

Update: rsync is not really an option. can't install it easily (UNIX team is, hum, hard to deal with)

Upvotes: 0

Views: 1584

Answers (4)

anjanb
anjanb

Reputation: 13927

if you're headed the way of FTP, here's 2 libraries

1) http://www.geocities.com/SiliconValley/Code/9129/javabean/ftpbean/
2) http://commons.apache.org/net/

Upvotes: 1

anjanb
anjanb

Reputation: 13927

use the ssh library jsch -- http://www.jcraft.com/jsch/. This program is used by ant to do ssh transfers. very good -- been there a long time(> 5 years), decent documentation.

Upvotes: 1

oxbow_lakes
oxbow_lakes

Reputation: 134340

Or you could use FTP. Or you could mount some shared storage.

Upvotes: 1

Paul Croarkin
Paul Croarkin

Reputation: 14675

You could use Runtime.exec() to launch rsync.

Upvotes: 1

Related Questions