Question is in the Title, Here's my code which dosen't seem to work:
File counterValues = new File(getClass().getResource(COUNTER_VALUES_FILE).getFile());
FileWriter out = new FileWriter(counterValues);
out.write("TEST");
out.close();
where COUNTER_VALUES_FILE
is private static final String COUNTER_VALUES_FILE = "/data/counter_values.csv";
I have also tried:
File counterValues = new File(getClass().getResource(COUNTER_VALUES_FILE).toURI());
It has made me believe it might not be possible, but i don't see why not if i can read from the file!