Eclipse: Workspace in use or cannot be created Error

Lot of time when I am working in Eclipse, it get crashed due to some or the other reasons. Most of the time this is because I have opened a lot of applications that I am working on and this takes a bit of memory. So finally everything just get hanged and does not have enough RAM to work on. Thus, Eclipse just get hanged and what I do is to kill the eclipse process.

But next time when you try opening the workspace it gives you error “Workspace in use or cannot be created, choose a different one.”

This is because, Eclipse creates a .lock file in the workspace and make the workspace lock. This is to avoid opening the same workspace in different eclipse process.

But when Eclipse is crashed or you kill the process to free the memory, it does not delete the .lock file in workspace folder and thus you cannot open the workspace again with eclipse.

To avoid this problem, simply locate the .lock file in your workspace folder and delete it. Please do not delete the .lock file if eclipse is already opened.

View Comments

  • Ahh, thank you. Although I spotted my .lock file in the metadata folder (at the root of my workspace),

  • hi.when i am opening the eclipse IDE at that time it is giving me an error message -
    " Workspace in use or cannot be created, choose a different one ".
    when 1st time it gave me this msg i had opened a new workspace but each time i m opening IDE i have to create a new workspace.after my PC has been added to n/w it is not a;;owing me to delete any data that i had previously stored and previous workspace as well.So i made new workspace that is editable in which i had deleted the .lock file.then also it is giving me the same error.Please help meee...................

  • Wow.Worked like a charm. Had mistakenly killed an eclipse process from terminal while its open and it was not recoverable. Thanks for the suggestion

  • Thank you .. this was useful. I thought I have sacrificed my workspace. but thanks to this article

Recent Posts

  • Java

Java URL Encoder/Decoder Example

Java URL Encoder/Decoder Example - In this tutorial we will see how to URL encode/decode…

4 years ago
  • General

How to Show Multiple Examples in OpenAPI Spec

Show Multiple Examples in OpenAPI - OpenAPI (aka Swagger) Specifications has become a defecto standard…

4 years ago
  • General

How to Run Local WordPress using Docker

Local WordPress using Docker - Running a local WordPress development environment is crucial for testing…

4 years ago
  • Java

Create and Validate JWT Token in Java using JJWT

1. JWT Token Overview JSON Web Token (JWT) is an open standard defines a compact…

4 years ago
  • Spring Boot

Spring Boot GraphQL Subscription Realtime API

GraphQL Subscription provides a great way of building real-time API. In this tutorial we will…

4 years ago
  • Spring Boot

Spring Boot DynamoDB Integration Test using Testcontainers

1. Overview Spring Boot Webflux DynamoDB Integration tests - In this tutorial we will see…

4 years ago