February 21, 20178 yr I am attempting to read a text file to a List using the following code: List<String> accList = new ArrayList<String>(); try { accList = Files.readAllLines(Paths.get("file.txt"), StandardCharsets.UTF_8); } catch (IOException e) { e.printStackTrace(); } but I'm getting the following error: Blocked permission: ("java.io.FilePermission" "file.txt" "read") Any help is appreciated.
February 21, 20178 yr 2 minutes ago, Adept said: I am attempting to read a text file to a List using the following code: List<String> accList = new ArrayList<String>(); try { accList = Files.readAllLines(Paths.get("file.txt"), StandardCharsets.UTF_8); } catch (IOException e) { e.printStackTrace(); } but I'm getting the following error: Blocked permission: ("java.io.FilePermission" "file.txt" "read") Any help is appreciated. You are only allowed to read and write files in the OSBot data directory. You can retrieve that directory using the getDirectoryData() method in the Script class
February 21, 20178 yr Author 4 minutes ago, Explv said: You are only allowed to read and write files in the OSBot data directory. You can retrieve that directory using the getDirectoryData() method in the Script class Worked like a charm! Thanks a lot!