I have to copy a file from one windows machine to other (the target is a virtual machine). When I execute it as a normal user, the file is successfully copied and : File f = new File(source); System.out.println(f.exists());
outputs true.
When I open a cmd as an administrator, and run the same program, this piece of code returns false`. And when trying
java.nio.files.Files.copy(source, target, options);
I get the following exception java.nio.file.NoSuchFileException
...
And this is in the case, when the folder on the remote machine, where the file is, is mapped to a drive, like
source = "N:\\..."
Does anybody have an idea what is the reason? (or respectfully has a solution)?