Hi guys,
Im sick of my workspace here being full of 20 odd libraries when im
pretty sure i only need about half of what ive got in my lib directory
(and my build path!).
Does anyone know of a tool which will let me know which libraries are
being used by my application and which libraries aren't? Be nice to be
able to do this all at once rather than deleting one library at a time
until it breaks :)
Thanks for your help guys, hope someone else has had the same problem.
Graeme
Mark Space - 02 Oct 2007 19:46 GMT
> Does anyone know of a tool which will let me know which libraries are
> being used by my application and which libraries aren't? Be nice to be
Hmm, running from the command line, I think java -verbose will show
classes loaded. That and some greping could tell you what's being used.
Alternately, just delete the libs from your classpath. When stuff
breaks, add it back in. Eventually you can delete all libs not in your
classpath from disk...
Manish Pandit - 03 Oct 2007 00:22 GMT
On Oct 2, 3:15 am, "gwoodho...@gmail.com" <gwoodho...@gmail.com>
wrote:
> Hi guys,
>
[quoted text clipped - 10 lines]
>
> Graeme
There is no straight-forward way. I normally organize the jars as user
libraries and then import those user libraries, like 'apache commons'
or 'pdf manipulation'. You might want to follow Mark's advice and
figure out what is needed vs. what is not. There is a catch though -
if it is a web-app, the code might compile just fine, but break at
runtime if you end up removing a runtime dependency.
If you are using maven (2+), it becomes very simple, as it's Eclipse
plugin generates an eclipse project with just the jars needed, as well
as sets up the build path.
-cheers,
Manish