How to read a file from remote system using java?

后端 未结 8 1122
忘了有多久
忘了有多久 2020-12-06 05:18

I have a file copied in one computer and I need to access the file from other computer. I am not sure, which protocol or which technology to use for this? Please provide me

8条回答
  •  天涯浪人
    2020-12-06 06:17

    You might try:

    URL url = new URL("file://192.168.1.157/home/renjith/picture.jpg");
    Image image = ImageIO.read(url); 
    

提交回复
热议问题