new File(filename).delete();
File victim = new File(filename); String namePrefix = victim.getName(); namePrefix = namePrefix.substring(0,namePrefix.lastIndexOf('.')); final String targetPrefix = namePrefix + "$Ajc"; File dir = victim.getParentFile(); if (dir != null) { File[] weaverGenerated = dir.listFiles(new FilenameFilter() { public boolean accept(File dir, String name) { return name.startsWith(targetPrefix); }}); for (int i = 0; i < weaverGenerated.length; i++) { weaverGenerated[i].delete(); } } victim.delete();
	public void deleteRealFile() throws IOException {		new File(filename).delete();	}