Jump to content

Eclipse won't move project. .metadata/.lock is locked


ziggurism

Recommended Posts

In Eclipse, if you want to reorganize your filesystem, you cannot just move your Eclipse project's files on the filesystem. Instead you right-click your project in Package Explorer -> Refactor -> Move, and select the new path (which I learned from stackoverflow).

 

However upon attempting this move with the Minecraft Forge Eclipse workspace, I get a "Move Problems" error dialogue with the error message

 

Could not move /MDKExample

Could not move C:\Users\user\forge-1.8.11.14-mdk

Could not read from source when writing file C:\Users\user\forge-1.8.11.14-mdk\eclipse\.metadata\.lock

The process cannot access the file because another process has locked a portion of the file

 

After clicking through the dialogue, the source and destination of the moves are both left in an unusable state due to the half-completed move of files. Downloading fresh copy and rebuilding the Eclipse workspace with gradlew setupDecompWorkspace && gradlew eclipse, the move fails every time. And I tried with several different versions of Forge. What is the secret to moving a project's location in the filesystem in Eclipse?

 

Windows Process Explorer shows that the only process with this file handle is eclipse itself, and after exiting Eclipse I am able to move the .metadata\.lock file (but not before). Why is Eclipse itself blocking the .lock file for a move? I tried creating a new blank Java project with a single Java class, and Eclipse moved it just fine, so is this problem something particular to Forge?

 

I'm using Eclipse Mars.1 (4.5.1) on Windows 10 with Java 8.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.