So I got this piece of code in my Java program;
String filename = "direct.txt";
String s = fil.getAbsolutePath();
Process p = Runtime.getRuntime().exec(s);
try
{
PrintWriter outputStream = new PrintWriter(filename);
outputStream.println(s);
outputStream.close();
}
catch (FileNotFoundException e1) {e1.printStackTrace();};
But when it writes to the file, it overwrites it when it writes something new, how can I make it so it doesn't overwrite but instead goes to the next line and prints it there?