So I'm a little late to the game here...4 years late, but this solution should work.
So this issue is arising because another program has that file open and could change its contents at any time (theoretically) and so your Operating System won't let you try to make changes too. This is typical to all OS's. You wouldn't want multiple copies of the same file open with different programs, because then you wouldn't really know which copy is the file of truth, or how to merge the changes properly, etc. Essentially you need to stop the program that is currently using that file so that you can read/write to it.
Anyways. If anyone looking for an answer here is using a Linux/Unix based OS, refer to this post.
If you're running into this issue on a Mac, the post above may work for you also since OSX is Unix based.
SOLUTION
If you're on Windows 10 (might work for older versions), you can just go to the file location in the file explorer, and try to move it to another folder. Don't try to delete it because it might actually work, but moving it should bring up a popup saying "File In Use" looking like this:

So the popup here says "the file is open in Java(TM) Platform SE Binary". That's your ticket.
Now go into Task Manager (Ctrl + Shift + ESC in Windows), and find and select the program has the file open, and click 'End Task'. Now you should be free to use/alter/run the file that you couldn't before.
Also, in the end restarting your computer will do the same thing generally. But this is faster IMO.
Hope this helps some people. Cheers.