Java Datei speichern
//Create a text file and write to it immediately
//stackoverflow
PrintWriter writer = new PrintWriter("the-file-name.txt", "UTF-8");
writer.println("The first line");
writer.println("The second line");
writer.close();
Annoying Ant