I have a text file in my resource folder and I need to be able to read/remove/add text. I believe I have to use append so I tried this.
Files.write(Paths.get(Testing.class.getResource("/testresources/SearchList.txt").getPath())
, "the text".getBytes(), StandardOpenOption.APPEND);
This gives me back
Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/Ben/workspace/Eve/bin/org/me/Testing/resources/SearchList.txt
If anyone could should me some clarity on this subject that would be great. Thankyou!