This content has been marked as final. Show 4 replies
It's possible, but RMI is really the wrong tool for this. Use a Socket.
when i used socket i am getting connection refused error.
how to resolve that error.
can you give me any example.?
You have to have a ServerSocket listening at the other end.
You need to read the Custom Networking part of the Java Tutorial.
A bit late, but I've used RMIIO in the past to stream files to/from an RMI server. Works great. Remember, a File object is simply a representation of a file, the object doesn't contain the file data. It is serializable, which can fool you to believe you can use it as a parameter in a RMI method call. You would wrap the File in a FileInputStream and then use RMIIO to stream the fis to the server. You'll figure it out.