boolean result = f.delete();//判断是否删除完毕 if(!result) { System.gc();//系统进行资源强制回收 f.delete; } 转载于:https://www.cnblogs.com/sprinng/p/5610250.html