Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java: How to delete file or directory when virtual machine terminates

Java: How to delete file or directory when virtual machine terminates
{filelink=7934}

import java.io.File;
public class Main
{
  public static void main(String[] args)
  {
    File fichier = new File("C:/test.txt");
    fichier.deleteOnExit();
  }
}

No comments yet.

Leave a Comment