0
所以我在我的Java程序中得到了这段代码;Printwriter如何不重写
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();};
但是,当写入文件时,它会覆盖它时,它写入新的东西,我怎么能让它,所以它不会覆盖,而是进入到下一行并打印呢?
已经回答[有](http://stackoverflow.com/questions/8210616/printwriter-append-method-not-appending) – udalmik