How to read a file from remote system using java?

后端 未结 8 1121
忘了有多久
忘了有多久 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:16

    Map your IP to network drive and try let us say the drive letter is X,

    then code changes to File f = new File("x:\\home\\renjith\\picture.jpg");

    Infact your file is already loaded in object f , try priting the value of the path f.getAbsolutePath() to console and see.. Actual error is with ImageIO

提交回复
热议问题