I tried to delete a file that I have two of, one slightly changed, so I could delete the older one and replace it with the new one I changed. When I tried to delete the file I g
Simply open the task manager on Windows, Check for Processes, Close all the java processes.
Now again try deleting the file, you should be able to.
This worked for me.