try{ File datei = new File("C:\Temp\Test.txt"); BufferedWriter writer = new BufferedWriter(new FileWriter(datei)); writer.write("Hallo"); writer.close();}catch(Exception e) { e.printStackTrace();}