Cannot delete jar from lib/ext folder

0

I've added a jar in the extension folder of my JRE (lib/ext) in order to provide an extension code to my applications. Now I want to delete this jar, but I cannot. The error message says:

Cannot delete. It is being used by another person or program

BTW. My Java program is not running at the same time I want to delete the jar.

How can I remove this jar from the ext directory of the JRE?

user1291235

Posted 2013-01-26T18:42:33.397

Reputation: 345

Is the folder on a network share or VM shared folder? Are there automated processes to index the file which might lock it? Have you tried logging in as another user on the VM to delete it? – Christopher Hostage – 2019-03-06T20:52:41.930

Which OS do you use? – MrSmith42 – 2013-01-26T18:47:13.370

I am using windows xp sp2 in a virtual machine. – None – 2013-01-26T18:47:54.017

Are you sure you don't have an obscure process running? If you're using Windows, what does the processes window say (Ctrl+Shift+Esc and then the processes tab)? – 11684 – 2013-01-26T18:48:07.073

well there are a lot of processes running, i cannot even say which one is locking the jar file... – None – 2013-01-26T18:49:19.977

If nothing else helps, reboot the system than you can be sure that there is no process having a lock in the file. – MrSmith42 – 2013-01-26T18:49:45.687

Even if I restart i cannot delete the file... :/ – None – 2013-01-26T18:51:02.627

2

Use the software "Unlocker" for deleting such files. You can download it from here http://www.filehippo.com/download_unlocker/

– None – 2013-01-26T19:01:39.330

Answers

0

Extended ProcessMonitor by Microsoft - http://technet.microsoft.com/en-us/sysinternals/bb896645 is really great tool that could show you which process is using your particular file.

Btw: simplest way - rename your file to some other temporary name (it is possible under windows when file is already blocked by some other program), reboot computer, remove file with your 'temporary file name'.

ya_pulser

Posted 2013-01-26T18:42:33.397

Reputation: 101