Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Finding a class in a sea of JARS?

Options
  • 27-05-2003 11:21am
    #1
    Registered Users Posts: 21,264 ✭✭✭✭


    Anyone know of a tool that can do this.

    Let's say I have 100 JAR's in various subdirectories. I'm looking for a class and I know the full import name. Is there a tool that will taking that information tell me what jars have that class in it (with the correct package path).


Comments

  • Registered Users Posts: 1,186 ✭✭✭davej


    You can use a normal search.

    In windows:

    search for all *.jar files containing text "packagePath/x.class"

    In unix use find/locate and grep.

    davej


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    So just use '/' intead of '.' ?


  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    That should work Hobbes - a Jar being a glorified ZIP file, and having an internal directory structure to match the qualified class name.

    If you open any zip file, you'll find a fairly readable chunk at the top.

    There must be an easier way to do it though....

    jc


  • Registered Users Posts: 107 ✭✭Balmark


    Download pkunzip.exe

    copy it to where your jars are

    type in dos box

    pkunzip *.jar com\my\package\MyClass.class -t

    and it'll tell you where it found it (-t for test)
    That or just do a text search on the .jar files with any text search (the windows search for files containing text works .. )

    Anyhow .. thats that ;)

    /Bal


Advertisement