This content has been marked as final. Show 7 replies
Your security policy doesn't grant you the permission necessary to delete that file, as you can see in the SecurityException.
@EJP and others
How did you overcome this?
I mean, this is obviously an "extra-Java" issue.. Is there anything I can do ?
Please notice this problem occurred both on Windows and Linux ...
Well, yeah. You could stop using a SecurityManager. That would allow you to delete the file. Or you could create a SecurityManager which allows the deletion of files.
I mean, this is obviously an "extra-Java" issueNo it isn't. You installed a SecurityManager. You didn't install a .policy file that granted you file delete permissions in that directory. You tried to delete a file in that directory. The SecurityManager prevented you. 100% pure Java, as we said in the old days. As DrClap says, either don't install a SecurityManager or create/fix your .policy file. See the Javadoc.
Hey guys, thank you for your valuable inputs.
I´m checking all and soon giving a feedback.
Sorry for late response.
I figured out that I had to create a policy file granting permissions to delete the file or hacking the java.policy file (under jre installation folder) to do so.
Thanks a lot.
I figured outYou 'figured out' exactly what I told you on 1 and 2 December.