When I am trying to delete a file which is present in tomcat server conf/Catalina/localhost from java code then file.delete() always returns false. But if I am checking the
You must close the stream before deleting it.
e.g -
fileInputStream.close(); file.delete();