File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse: show used libs of project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse: show used libs of project" Watch "Eclipse: show used libs of project" New topic
Author

Eclipse: show used libs of project

manuel aldana
Ranch Hand

Joined: Dec 29, 2005
Posts: 308
hi,

i am looking for following eclipse-capability:
select a projekt and show me all the libraries (jars), my sources are using indeed.

this way i want to clean up unused and therefore unneccessary library imports into the classpath. i think this must be somehow included in eclipse IDE, because it should not be to tricky to be realized (browse all my sources and analyze imports and compare with types in included libraries.

of course this would not be completely reliable because you always can hack this static typing with reflection. but at least it would be a help to find dead library imports.

thanks.


aldana software engineering blog & .more
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950
    
  19

Within an error-free Eclipse project, you can simply go to the builder page and remove JARs from the project one by one. Each missing jar with static usage will cause the java source file decorators to light up (the white "X" in the red circle), which will be an indicator that you should put it back.

Or you can remove all the jars and just keep adding back until all the errors go away. I've done this from time to time.

Once you've cleaned the list of jars from your project, you should be able to go into the physical library directories and delete the jar files.

I do recommend you archive the project before you do this, though!


Customer surveys are for companies who didn't pay proper attention to begin with.
manuel aldana
Ranch Hand

Joined: Dec 29, 2005
Posts: 308
yes, know how to it manually but hoped that there was an automatic help of eclipse... something similar to unused import -> unused libraries.
 
 
subject: Eclipse: show used libs of project
 
Similar Threads
Eclipse and Exporting Libraries
Gwt Gdata using OAuth
ANT: Problems with imported libraries
How to write pure JAX-RPC client to invoke webservice?
Eclipse: How to add Tomcat Library?