Here you can find the source of deleteTempFile()
public static void deleteTempFile()
//package com.java2s; /*L//from www . java 2 s . c om * Copyright Washington University in St. Louis * Copyright SemanticBits * Copyright Persistent Systems * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/gsid/LICENSE.txt for details. */ import java.io.File; public class Main { private static String fileName = "temp.txt"; public static void deleteTempFile() { try { File f = new File(fileName); f.delete(); } catch (Exception e) { } } }