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
temp.txt
A file created by:
File temp = File.createTempFile("temp",".txt");
Will not be deleted, see javadoc, you have to call
temp.deleteOnExit();
so the JVM will delete the file on exit...