- Joined
- Apr 2, 2011
- Messages
- 17
- Reaction score
- 0
- Points
- 1
I have been on mac for a short time and am having trouble reading a file from a network shared folder. There are 3 machines involved
The shared folder and file is on a raspberry pi running samba under the latest stretch os release.
There is a PC running windows 10 and a Mac running High Sierra.
All 3 machines are on the same wireless network and in the 'workgroup' workgroup
The PC can reach the shared file on the pi with java code, the network, and with ssh and the mac can reach it with ssh and the Finder. The problem is the Mac can't reach the file with the java code below. The error message follows the code. What is wrong?
Here is the code:
This is the error code:
The shared folder and file is on a raspberry pi running samba under the latest stretch os release.
There is a PC running windows 10 and a Mac running High Sierra.
All 3 machines are on the same wireless network and in the 'workgroup' workgroup
The PC can reach the shared file on the pi with java code, the network, and with ssh and the mac can reach it with ssh and the Finder. The problem is the Mac can't reach the file with the java code below. The error message follows the code. What is wrong?
Here is the code:
Code:
JSONParser parser = new JSONParser();
// read the schedule file
try {
Object obj = parser.parse(new FileReader("//nsp/pi/sprinkler/schedule.json"));
} catch (ParseException | IOException e) {
System.out.print(e.getMessage()+"\n");
}
}
This is the error code:
/nsp/pi/sprinkler/schedule.json (No such file or directory)
Various file name formats have been tried with the same results:
"//nsp/pi/sprinkler/schedule.json"
"\\\\nsp/pi/sprinkler/schedule.json"
"\\\\nsp\\pi\\sprinkler\\schedule.json"
"//nsp.local/pi/sprinkler/schedule.json"