There are several standard ways for getting files from folders, but they generally don't involve RMI. There's FTP, which was specifically designed for that, and then there's HTTP, which wasn't specifically designed for that but does have features which support it.
But RMI? That's Remote Method Invocation, remember? To have it transfer a file, you would have to produce an object with a method which returned the entire contents of the file, most likely as a byte array. This would require storing the entire file in memory before transmitting systems, which is a bad idea as it limits the size of the file which can be transmitted. So I would consider RMI a poor choice for file transfer.
Joined: Jan 19, 2010
Thanks so much for the response... how can i implement the ftp way of transfering these files from the server's AbsolutePath to the Client's AbsolutePath
I will really appreciate it if you put me through a simple model
Thanks in advance
If you download Apache Commons Net you'll find it supports FTP clients. I'm assuming you have already confirmed that there is an FTP server running on the server you were talking about, and that you will have access to the desired file via that FTP server.
I would definitely try Paul's suggestions first. However, back in the old days of Java ... I'm thinking around 1998 ... I made a RemoteFileSystemView implementation of the javax.swing.filechooser.FileSystemView, which plugs into a JFileChooser. I can't remember the details, but I know it did work, and I made both an RMI and raw socket version. Both required a corresponding Java application to be running on the remote machine. Swing was in flux in those days, and I had to make some tweaks to make everything work. The Swing developers actually incorporated the tweaks into the code base, so that's my one and only contribution to the Java API, assuming it's even still there.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: I want to get a file from a folder on the server using RMI