2

I have couple of different OSs installed. When I try to start eclipse in another OS eclipse starts complaining about workspace being used by 'another eclipse instance'. In case you don't know eclipse uses .lock files for that.

How to fix this?

I see a couple of possible ways to deal with this problem:

  1. Disable .lock file check (It can cause some problems if opening workspace in 2 eclipses at the same time)
  2. To make an empty 'workspace' just to make eclipse happy about all that settings and .metadata and .locks and keep projects elsewhere.
  3. Removing .lock file every time I boot another OS. But what if I'll make a new workspace?

Is there a standard (or just better) solution of this problem?

Community
  • 1
  • 1
Alex Bolotov
  • 8,781
  • 9
  • 53
  • 57

2 Answers2

1

If you exited Eclipse cleanly, then it should not complain about the Workspace being used. Or do you want to access a Workspace with multiple Eclipses simultaneously?

UPDATE: Anyway I did this on a Mac, using the same Workspace on a FAT32 partition from OSX, Ubuntu and Windows, and I didn't encounter many problems. Of course remember to set the file encoding and line termination setting project or Workspace wide!

P Varga
  • 19,174
  • 12
  • 70
  • 108
  • I haven't thought about that. I guess that problems was because of of some hfsplus glitches. No I don't want to access a Workspace with multiple Eclipses simultaneously. I'll try that. – Alex Bolotov Feb 11 '12 at 13:36
1

Eclipse workspaces are not designed or intended to be shared across different machines (nor across different operating systems). Trying to do so is certain to cause headaches and possibly even corruption of the workspace. There are things like absolute file paths (and other artifacts) embedded into workspaces that simply are not portable.

The better approach is to locate the projects elsewhere in the file system outside of the workspace; that way you can have multiple workspaces "contain" the project(s). Creating such a project is easy from the project creation wizards (a checkbox labeled like "Use default location" that needs to be un-checked, and an accompanying field that is filled in with the desired files system location). From another workspace, use File > Import > Existing Project Into Workspace to get the project in.

E-Riz
  • 31,431
  • 9
  • 97
  • 134