Basics - reading/writing remote files using Java

前端 未结 4 1777
闹比i
闹比i 2020-12-05 16:47

I started with requirement of reading and writing files in from/in a directory on a remote Ubuntu machine.

First, I wrote a Java program that could read,write files

4条回答
  •  心在旅途
    2020-12-05 17:16

    I think RMI might be the solution, you could set up a server an RMI server on the machine you want to connect to, and use your machine a the client.

    I would give the client a path to the file this will be sent to the server, the server could then read in the file as bytes and sent the file back to the client.

提交回复
热议问题