Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse User Library reports existing jar as 'missing'

Tags:

java

eclipse

jar

Eclipse Indigo

I use user libraries to manage sets of dependencies for my builds in eclipse.

To this point it's been very straight forward, however today I had a new jar dependency I needed to add to a user library. I clicked Add Jar in the User Library page and located the jar in my file system. It appears in the user library list of jars and everything looks fine.

Then I close window and when I reopen the User Library view, that library is now in error. It reports the JAR as missing now. The only peculiar thing I noticed is it now lists the path as an incorrect absolute path instead of a relative path like other jars show. I have no way of editing this path it shows. All I can do is click to locate the jar in the file system, which it already loads up as the exact jar in the correct folder.

like image 895
Rich Avatar asked Feb 16 '26 04:02

Rich


1 Answers

It seems that eclipse noticed the path of the JAR file was within the path of an open project in the workspace. However that project had not been refreshed since the JAR was added, thus it did not show up in the file tree of the project.

From here my best guess is that Eclipse used its stale snapshot of the file tree rather than the actual one from disk in determining if the JAR file existed or not.

After refreshing the appropriate folder/project, the JAR resolved correctly in the User Library.

like image 154
Rich Avatar answered Feb 18 '26 18:02

Rich