• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Eclipse: show used libs of project

 
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
manuel aldana
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes, know how to it manually but hoped that there was an automatic help of eclipse... something similar to unused import -> unused libraries.
 
It looks like it's time for me to write you a reality check! Or maybe a tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic