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
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 file by file.exists() function it returns true.
Most likely you do not have permission for deleting file(s) on Server. Check your permissions.
f.delete()
returns false it means that it wasn't / could not be deleted and f.exists()
returns true so file exists but cannot be deleted.