Question

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)

Was it helpful?

Solution

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.

OTHER TIPS

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top