Eclipse will look like this: "Unable to determine URI for [project-name] / [file-path] / [file-name]"
Main problem:
I encountered the following error in Eclipse Luna:
You come to work one day and try to get eclipse up and running and be productive, but as soon as your desktop opens you will see that all your file tabs are wrong:
Unable to determine URI for 'my-project / path / to / file / filename.extension'
And if I check my views in nav / explorer, I can't see any of my projects.
The first couple of times I did this to recommend to other people facing the same problem:
- Eclipse error: Unable to determine URI for / project -path /
- Eclipse Luna "cannot determine URI for /project/src/com/.../classFile.java" (windows 8)
I have recreated my projects in eclipse.
But:
- the project got bigger (more and more subprojects are recreated each time)
- this problem is growing more and more often.
- I get tired of the manual work it requires.
So I am not satisfied with the solution at hand .
So I'm looking for a way to fix this problem automatically (with a script or a set of commands), or at least prevent it somehow.
My progress so far:
I went to workspace folder:
workspace
βββ .metadata
βββ .plugins
βββ org.eclipse.core.resources
βββ .projects
βββ project1-newName
βββ project1-oldName
βββ project2-newName
βββ project2-oldName
So my project metadata is still there !?
If I dig a little further I can see that each folder is organized like this
.
βββ .indexes
β βββ [...]
βββ .location
βββ .markers
βββ org.eclipse.jdt.apt.core
βββ org.eclipse.jdt.core
βββ state.dat
Where
-
.indexes
contains fat-mambo-jambo-of-split-index-tree-organization containing ahistory.index
on each output- (not like my problem)
-
.markers
empty -
state.dat
empty -
.location
contains a stringURI//file:/home/myname/projects/my/project/source/folder
among some scrambling characters such as@ #% η£
I'm pretty sure the solution is inside this file .location
.
Output:
Does anyone know why eclipse can't suddenly read its own files and how to get it to see and recognize again?
source to share
You can fix the problem by trying this:
- Right click on Package Explorer
- Select Import
- General > Existing Projects in Workspace > Go to Project
(select root) > select a project. - Done. This will definitely solve your problem.
If that doesn't work, go to File System (General> FileSystem) and select the project files.
The first method is pretty simple and works great in most cases.
source to share
I faced the same problem. The above suggested method does not work in my case as the Package Explorer -> export option remains disabled, so I decided to create another workspace in Eclipse and followed the steps Import-> General -> Existing Projects into the workspace. It worked fine after finishing the Workspace build.
source to share