views:

1375

answers:

5

We have a Java application server running on Sun Solaris. We now need to be able to write files and read files to/from a separate machine, which is running WindowsXP. These 2 machines are administered by 2 separate groups within the same firewall. If it is easier, we could use Java to write the file to Solaris and then use some 3rd party program to move the files to/from the Windows machine.

What is the best way to handle this?

Just one more piece of information: our group administers the Solaris machine and we could add software to that machine if necessary. But trying to get the other group to add any software to the Windows machine would be a major pain. So I would prefer a solution that does not require installing anything on the Windows machine.

+2  A: 

Synchronise the datastores/filesystem (folder) of the machines using a tool like Rsync

Installing ssh and rsync on a Windows machine: minimalist approach

Martin K.
+1  A: 

If you didn't want to change your application you could make the files on the Windows XP system available on the Solaris system at the OS level, so your application can work with the files on XP system as if they were local files.

You can do this in two ways:

  1. Use Windows Services for Unix to create an NFS share on the Windows XP system which you mount as normal on the Solaris system.
  2. Create a normal Windows share and mount it on the Solaris system using Samba.

However, both of these options require additional software installation on one of the systems so may not be practical.

Dave Webb
+5  A: 

Probably the simplest way would be to set up a share on the windows machine and use Samba to mount that on the Solaris machine. Then your Java app would see that directory just like any other local directory on the filesystem.

Herms
Just to add to this answer: you can use the JCIFS library as a SMB client without the need for Samba (I believe JCIFS is associated with the Samba project, however)
Adam Paynter
The nice thing about using Samba itself though is that the application doesn't have to know about it. You could be saving to a local location or to a network share. To the app it's completely transparent.
Herms
A: 

Secured FTP server/client and Apache Commons VFS

Boris Pavlović
A: 

My first choice for moving files between machines is scp (remote file copy over SSL). There's a Windows version in PuTTY. Presumably there's a Java library to perform scp somewhere.

Tom Hawtin - tackline