Hi to all,
I stored a file in the client system from an applet and uploaded to the server. Now I want to delete the file from the client system. When I tried to call delete() method on the file object it is returning boolean value false i.e., the file is not getting deleted. My Applet is an signed applet. Why is it not getting deleted?
Thanks in advance
Joined: Mar 22, 2005
Is the File object constructed properly? Meaning, does "exists()" return true right before the class to delete? If it does, check the permissions on the file and make sure that the current user has write permission.
Thanks for your reply. As you said, File.exists() returning true and also the user has permissions to delete files. How can I check from javacode to check file permission.
I even tried FilePermission p = new FilePermission(createdFile.getAbsolutePath(), "read,write,delete"); to set file permission. Still it is not getting delete. How can I debug to get the actual cause.
Anil M Kumar
Joined: Jan 05, 2009
I tried to delete the file from a standalone program (a simple program having main method), the file is getting deleted, but trying to delete from an applet program, failed to delete.