sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #07969
[Question #184138]: [Java] Reading a file on a network drive
New question #184138 on Sikuli:
https://answers.launchpad.net/sikuli/+question/184138
I'm attempting to read a file I created on a network drive. The problem is that in Eclipse, I specified my path as:
path = "\\\\sever\\folder\\folder\\file.txt"
I get the following output:
java.io.IOException: Failed to open file:////server/folder/folder/file.txt. Error message: The parameter is incorrect.
The code is use to open the file is as follows:
public void OpenFile() {
try {
if (Desktop.isDesktopSupported()){
desktop = Desktop.getDesktop();
}
desktop.open(new File(path));
} catch (IOException e) {
System.out.println("File could not be opened");
e.printStackTrace();
}
}
ReadTextFromFile rtff = new ReadTextFromFile(path);
rtff.OpenFile();
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.