1
File file = new File("\\10.200.64.8\\home\\rbts\\IBST000826");
FileInputStream fin = new FileInputStream(file);

给出错误,我也尝试过

File file = new File("file:\\10.200.64.8\\home\\rbts\\IBST000826"); 

File file = new File(new URI("file:////10.200.64.8/home/rbts/IBST000826"));

该文件在linux机器上,我在windows机器上访问它。任何机构都可以提供建议或解决方案。

java.io.FileNotFoundException: \10.200.64.8\home\rbts\IBST000826 (The system cannot find the path specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at com.sapphire.oracle.osb.hbl.isohandler.utils.ISO_MessageUtils.getFileContent(ISO_MessageUtils.java:350)
    at com.sapphire.oracle.osb.hbl.isohandler.utils.ISO_MessageUtils.main(ISO_MessageUtils.java:366)
4

1 回答 1

2

改成:

File file = new File("\\\\10.200.64.8\\home\\rbts\\IBST000826");
                    //^^^^

以确保\\在文件路径中。

于 2013-08-12T16:01:06.833 回答