Here you can find the source of removeFile(final String removePath)
protected static void removeFile(final String removePath)
//package com.java2s; //License from project: Apache License import java.io.IOException; import java.nio.file.*; public class Main { protected static void removeFile(final String removePath) { try {//w w w .java 2 s.com final Path path = Paths.get(removePath); Files.delete(path); } catch (final IOException e) { System.err.println("Couldn't delete file. Exception: " + e); } } }