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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Finding a class in a sea of JARS?

  • 27-05-2003 10:21am
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


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


  • Registered Users, Registered Users 2 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, Registered Users 2 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