tags:

views:

477

answers:

5

I use the eclipse Ganymede sdk for developing Java apps. I'm having a strange Issue.

Everything was working fine until recently where the "referenced Libraries " folder went missing from the explorer.

I used to upload the jar's I need Into the workspace. I uploaded the jars In a folder named "lib" and after refreshing the project folder In eclipse that folder "lib" containing the Jar appears. Now,the Issue arises,when I right click on the jar and select "add to path" the jar Instead of appearing In the "referenced libraries" folder just disappears. Note:the referenced Library was never there In the first place,I need to find a way to get the folder back.

here's a snapshot of my eclipse framework : http://www.flickr.com/photos/38561743@N03/4122304046/sizes/o/

A: 

Sounds like you've accidentally enabled a filter on the explorer view. Bring up the "view menu" item (the downward-pointing arrow at the top right of the explorer pane), pick "filters", and make sure "libraries from external" and/or "libraries from project" is not selected.

skaffman
I'v checked It.both are unchecked,heres the screen shot : http://www.flickr.com/photos/38561743@N03/4122057843/sizes/o/please, can you help ? :(
Parastar
+2  A: 

Did you uncheck the Show 'Referenced Libraries' Node (accessible through the menu for Package Explorer: the small triangle in the explorer’s title bar)?

(EDIT: The OP provided a screen shot showing that Show 'Referenced Libraries' Node is checked in comment to this answer. He confirmed that libraries are not filtered too in a comment to another answer. So, actually, I don't know what is happening here. Strangely, I can't see the "JRE System Library" neither and this seems weird. So something must be wrong indeed, but I don't know what. This is not really a good solution but if you can't solve it, maybe consider reinstalling Eclipse.)

Pascal Thivent
Hi,I'v check out the view menu section.the "show reference libraries" were ticked.But It still doesn't work,the referenced libraries are still missing from the explorer.heres the screenshot : http://www.flickr.com/photos/38561743@N03/4122829868/sizes/o/please,can you help,Its really annoying,I want to get to my coding as soon as possible and this little thing Is really getting to my head.Thanks,
Parastar
A: 

Please post the contents of your .project and more importantly of the .classpath files. They're located in the root of your project, but hidden. Use either Windows Explorer or the Eclipse Navigator view to see them.

The .classpath should contain an entry like the following:

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>

For libraries, the .claspath file should contain entries like this:

<classpathentry kind="lib" path="lib/somelib.jar"/>
mhaller
can you give a bit more details on how to see them?I don't know how to use the eclipse navigator as well as the Windows explorer to view them.can you help?Thanks,
Parastar
You don't know how to double-click a file and open it in a text editor? :-O
mhaller
A: 

I have a hunch that this is because the lib folder is actually empty and there is nothing aded to classpath yet.

This is how you can be sure 1. In package explorer, select "lib" folder and press F5 (refresh). If it doesn't gets the + sign in front of it, the folder is empty. 2. Right click on "lib" and select "Go Into". If the package explorer gets empty, the folder is empty. Select the back arrow icon from the package explorer view menu to get back. 3. Select "lib" menu and do press "Alt + Enter". You should see a properties dialog. Note the path in front of "Location". Copy it and open this location is windows explorer. You can verify that its actually empty or not.

You will see referenced libraries only when a jar has been added to the build path (I guess you know this already).

Try adding a dummy jar to build patch to see if referenced libraries shows up. You may use the "Add external jar" button on the "Libraries" tab of the "Java Build Patch" dialog for quickly verifying this.

Ankur
A: 

This is a reproduceable bug in Eclipse. Just click the 'X' on the Project Explorer tree to close it, then re-open it. Once you've done that, you'll no longer have the libraries contained in a "Referenced Libraries" folder... they'll just show up in the root of the project folder--which is highly annoying!

Michael