javaeclipse

Eclipse: Path for IClasspathEntry must be absolute


I have two operating system in my laptop i.e. Windows and Ubuntu. Usually I am working in Ubuntu. Yesterday I open my eclipse workspace in Windows OS and then I tried to open in Ubuntu then it's throwing error: An internal error occurred during: "Loading descriptor for UMS.".Path for IClasspathEntry must be absolute: D:/eclipse-workspace/UMS/src/main/webapp/WEB-INF/lib/activation.jar

enter image description here

Its geting D:/eclilpse.... i.e. clearly windows path.

I am unable to open eclipse in Ubuntu. Googled and applied some advices but still problem exist. Please help me

Best regards


Solution

  • You can't use the same workspace for the different installations; eclipse stores absolute paths to various resources and paths in windows and linux look nothing alike. There is no way of fixing that: It is not possible to have a linux-based eclipse and a windows based eclipse and pick the exact same folder when you boot them up and select the 'workspace location'. They must be different locations.

    You can use the same projects, though. There's no need to clone that. All you need to have 2 of, is the workspace settings. This does mean if you, in eclipse's settings, e.g. add a keybinding you have to also add that to the other installation, or, use eclipse's sync settings/export-import settings system to do that.

    2 workspaces with the same projects

    As discussed, when eclipse prompts you for the workspace, on linux pick a different folder. This will result in a 'blank' eclipse with no projects and no customized settings. If you have a bunch of settings you want to copy, the settings dialog has export and sync functionality.

    To get the same projects in this 'new' eclipse on your alternate OS:

    Via the menu File, Import..., pick 'existing projects into workspace', type in the right folder in 'root directory' - the folder that contains all your project folders. The projects box populates with all your projects once you finish typing. Hit 'select all', 'finish', and you now have 2 separate workspace configs, each pointing at the exact same folders.