Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
gwoodhouse@gmail.com - 02 Oct 2007 11:15 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.