I\'m facing this strange problem.
I\'m trying to read a file that is located in another machine as a shared resource:
\\\\remote-machine\\dir\\MyFile
I had a similar problem once. I think it has to do with the way java resolves remote files URI's. Try the following and see if it works:
File:////remote-machine/dir/MyFileHere.txt
I used the folowing example to verify the existence of a file in shared folders in my box and worked:
public static void main(String[] args) throws URISyntaxException{
URI uri = new URI(args[0]); //args[0] = File:////remote-machine/dir/MyFileHere.txt
File f = new File(uri);
System.out.print(String.format("File %1$s Exists? %2$s", args[0],f.exists()));
}