Eclipse: Refresh the Package View

Sometimes it’s those little things that drive you nuts, like expecting that when Eclipse displays the Project Properties dialog and you click the Build Path and then click “Add Jars” the resulting list will contain whatever .jar files you happen to have placed in the project folders. Apparently this is not so. Today I needed to add a few .jar files to a project, so I copied them into the lib folder under my project, where the existing .jar files already live. I then went into the project properties to add the jars to the build path. But there were no jars to add. I stumbled around a bit like the idiot I often am, until I happened to click “File | Refresh” from the menu bar with the package selected. Bingo. Eclipse refreshed the package list and suddenly all my shiny new jars were there and available to be added to the path. I had to select the package first, however. If it wasn’t selected then the “File | Refresh” choice was disabled in the menu.

Leave a Reply

Your email address will not be published. Required fields are marked *