I am trying to write a method that makes a \"log.txt file\" if one does not already exist and then writes to the file. The problem that I am encountering is every time I cal
You can change your PrintWriter and use method getAbsoluteFile(), this function returns the absolute File object of the given abstract pathname.
PrintWriter out = new PrintWriter(new FileWriter(log.getAbsoluteFile(), true));