Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse locks jar files

I have a maven project in eclipse indigo with m2e 1.2.0.20120903-1050 maven plugin. That project contains maven system dependencies and these jar files are checked into git repository.

That is all fine until I need to switch to another branch which has changes in system dependencies. Git can not update contents as file is locked.

That seems that eclipse on its own or on behalf of m2e locked jar libraries. I tried closing project but that does not help, in order to release lock I have to restart eclipse.

That is rather cumbersome. Are there any trick to release lock without restarting eclipse?

like image 578
michael nesterenko Avatar asked Feb 20 '13 22:02

michael nesterenko


1 Answers

Windows

You can manualy use handle.exe from http://technet.microsoft.com/de-de/sysinternals/bb896655.aspx

  1. handle.exe .jar gives you a list by handle-id and process-id of all jar's.
  2. handle.exe -c <handle-id> -p <process-id> kills the Handle, maybe a exception will be thrown, if so, fill a bug-report to Eclipse's bug-report-system please to let us know about dead-locks.

EDIT:

It is important to execute the command using Administrator rights (Thanks to Paulo Merson).

like image 169
Grim Avatar answered Sep 20 '22 00:09

Grim