Libraries Galore! ... now how do i get rid of them?

G

gwoodhouse

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
 
M

Mark Space

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...
 
M

Manish Pandit

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

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top