I'm writing string to temporary file (temp.txt
) and I want that file should open after clicking button of my awt window it should delete when I close that file (after opening that file), how can I do this?
This is the code that I have been using to create temporary file in Java:
File temp = File.createTempFile("temp",".txt");
FileWriter fileoutput = new FileWriter(temp);
Bufferedwriter buffout = new BufferedWriter(fileoutput);
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…