Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Libraries Galore! ... now how do i get rid of them?

Reply
Thread Tools

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

 
 
gwoodhouse@gmail.com
Guest
Posts: n/a
 
      10-02-2007
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

 
Reply With Quote
 
 
 
 
Mark Space
Guest
Posts: n/a
 
      10-02-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> 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...
 
Reply With Quote
 
 
 
 
Manish Pandit
Guest
Posts: n/a
 
      10-02-2007
On Oct 2, 3:15 am, "(E-Mail Removed)" <(E-Mail Removed)>
wrote:
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
standard libraries don't behave like standard 'libraries' Sriram Srinivasan Python 13 11-12-2009 06:05 PM
Using mandatory libraries (custom class loading vs. expanding libraries) Karsten Wutzke Java 21 06-29-2007 09:25 PM
how do I get rid of beeping sound every time I get a new email? joe54345@gmail.com Computer Support 13 12-06-2005 10:14 PM
Getting rid of message "its now safe to turn off your computer" Buffy Computer Support 2 06-25-2004 08:38 PM



Advertisments