I have the following code :
public Tester()
{
try {
File f4 = new File("C:\\Vase.zip");
System.out.println(f4.exists());
f4.delete();
System.out.println(f4.exists());
} catch (Exception e) {
e.printStackTrace();
}
}
When I run the program, it does not delete the file. (If I place the file in the D drive and then ask it to delete, it works perfectly.) So I know that it is a permissions thing. I am using eclipse. I ran eclipse in admin mode only [in windows].
The program is able to write and delete other files, but this one alone is not working. Can anyone guide me on how to solve this?
May be it is open in your archiver.
Or somewhere else.
Or (unlikely but possible) – some process is over, but the system is still holding it on behalf of that process.
If that doesn’t work – permissions should be the problem.