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

Discussion in 'Java' started by gwoodhouse@gmail.com, Oct 2, 2007.

  1. Guest

    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
    , Oct 2, 2007
    #1
    1. Advertising

  2. Mark Space Guest

    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...
    Mark Space, Oct 2, 2007
    #2
    1. Advertising

  3. On Oct 2, 3:15 am, "" <>
    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
    Manish Pandit, Oct 3, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Addison

    Server errors galore, local runs fine

    George Addison, Nov 28, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    303
    Tommy
    Nov 29, 2003
  2. =?Utf-8?B?c2VndWU=?=

    dynamic checkbox list challenge galore

    =?Utf-8?B?c2VndWU=?=, Aug 4, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    4,392
    =?Utf-8?B?c2VndWU=?=
    Aug 5, 2005
  3. =?Utf-8?B?cm9kY2hhcg==?=

    tabs galore

    =?Utf-8?B?cm9kY2hhcg==?=, Feb 5, 2007, in forum: ASP .Net
    Replies:
    7
    Views:
    402
    Mark Rae
    Feb 6, 2007
  4. Replies:
    18
    Views:
    502
  5. kenny
    Replies:
    1
    Views:
    188
    Thomas 'PointedEars' Lahn
    Jan 3, 2011
Loading...

Share This Page