I would suggest two approaches. Both need file to be uploaded on server. Only difference is how it is delivered to user or where file is stored.
1. Email as Attachment
Use any POP3 server (e.g. Apache James) and send file as attachment to the second user.
2. Store file in file system on server or as BLOB in database. Have a link which when clicked will download this file.
>> 2a. Send this link via email to second user
>> 2b. Display this link to second user when he logs into the system
>> 2c. Above point (2b) could be extended to notify user by email of available file
I will not recommend either of RMI or JINI for this.
If file is of larger size, I will recommend to write upload
servlet on server such that it can accept normal file as well as compressed zip file. Then user can either upload file directly or zip it and then upload. Further more we can also have file upload
applet which can automatically zip file before upload.
Also for download file we can check for "Accept" header from client and gzip file before downloading it.