how to disassembly a .jar file? how to see what are the classes inside the .jar file?

Discussion in 'Java' started by lucy, Aug 26, 2004.

  1. lucy

    lucy Guest

    Dear all Java gurus,

    Is there a way to disassembly a .jar file. How to see what are the classes
    inside the .jar file; what are the methods available, and the calling
    convention to those mothod functions?

    Is there such a debugger or disassembler in Java?

    thanks a lot
    lucy, Aug 26, 2004
    #1
    1. Advertising

  2. lucy

    Paul Lutus Guest

    lucy wrote:

    > Dear all Java gurus,
    >
    > Is there a way to disassembly a .jar file. How to see what are the classes
    > inside the .jar file; what are the methods available, and the calling
    > convention to those mothod functions?
    >
    > Is there such a debugger or disassembler in Java?
    >
    > thanks a lot


    List jar contents:

    jar -t filename.jar

    Extract a named file:

    jar -x filename.jar (name)

    Extract all:

    jar -x filename.jar

    --
    Paul Lutus
    http://www.arachnoid.com
    Paul Lutus, Aug 26, 2004
    #2
    1. Advertising

  3. lucy

    Carl Guest

    Re: how to disassembly a .jar file? how to see what are the classesinside the .jar file?

    lucy wrote:

    > Dear all Java gurus,
    >
    > Is there a way to disassembly a .jar file. How to see what are the classes
    > inside the .jar file; what are the methods available, and the calling
    > convention to those mothod functions?
    >
    > Is there such a debugger or disassembler in Java?
    >
    > thanks a lot
    >
    >


    See http://java.sun.com/j2se/1.4.2/docs/tooldocs/tools.html

    Particularly the jar and javap tools.

    HTH,
    Carl.
    Carl, Aug 26, 2004
    #3
  4. lucy

    Byron Lee Guest

    In addition to using the jar commandline, if you're using an IDE (like Sun
    One Studio, etc.), you can mount the jar file and expand it in a tree
    structure to see all of it's classes, fields, method signatures, etc.
    visually.

    "lucy" <> wrote in message
    news:cgj5q8$lgj$...
    > Dear all Java gurus,
    >
    > Is there a way to disassembly a .jar file. How to see what are the classes
    > inside the .jar file; what are the methods available, and the calling
    > convention to those mothod functions?
    >
    > Is there such a debugger or disassembler in Java?
    >
    > thanks a lot
    >
    >
    Byron Lee, Aug 26, 2004
    #4
  5. lucy

    hg Guest

    Hi,
    The simple answer is yes. I do not know of a tool that will decompile the
    classes from the jar (but it may be out there). If you unzip or extract
    using jar -x so you have class files, then you can use jad to decompile.
    Also Jedit has a plugin that will use Jode, within the Jedit IDE.
    You could build a tool that would read the jar (see java.util.jar) and then
    stream the stuff to Jode, and for all I know this may exist as a plugin to
    Jedit. Jode is written in Java with source, Jad is C.

    This will work on 99% of the stuff out there. A few people have encrypted
    the class files, and provide a class loader that knows how to decrypt the
    files. Having written one of these encryption tools I would point out they
    are not that secure.Just note that by using Jode/Jad you may be breaking a
    copyright or other legal agreements, so don't publish the code you obtain
    this way, it almost always is illegal. There are a few books that discuss
    this, if you just want to hack then "Covert Java" is pretty interesting and
    while written on a basic level the author (Alex Kalinosky) does address some
    very interesting problems, but not for the OO crowd.

    Howie

    "lucy" <> wrote in message
    news:cgj5q8$lgj$...
    > Dear all Java gurus,
    >
    > Is there a way to disassembly a .jar file. How to see what are the classes
    > inside the .jar file; what are the methods available, and the calling
    > convention to those mothod functions?
    >
    > Is there such a debugger or disassembler in Java?
    >
    > thanks a lot
    >
    >
    hg, Aug 30, 2004
    #5
  6. lucy

    Smith Guest

    As someone said, jad is good. I would use winzip & extract all the
    class files into some directory and then run jad from dos on them.

    --------------------------------------------
    Answers to your java questions
    http://java-questions.pattonwebsolutions.com
    --------------------------------------------

    "lucy" <> wrote in message news:<cgj5q8$lgj$>...
    > Dear all Java gurus,
    >
    > Is there a way to disassembly a .jar file. How to see what are the classes
    > inside the .jar file; what are the methods available, and the calling
    > convention to those mothod functions?
    >
    > Is there such a debugger or disassembler in Java?
    >
    > thanks a lot
    Smith, Sep 6, 2004
    #6
  7. lucy

    steve Guest

    On Tue, 7 Sep 2004 03:58:47 +0800, Smith wrote
    (in article <>):

    > As someone said, jad is good. I would use winzip & extract all the
    > class files into some directory and then run jad from dos on them.
    >
    > --------------------------------------------
    > Answers to your java questions
    > http://java-questions.pattonwebsolutions.com
    > --------------------------------------------
    >
    > "lucy" <> wrote in message
    > news:<cgj5q8$lgj$>...
    >> Dear all Java gurus,
    >>
    >> Is there a way to disassembly a .jar file. How to see what are the classes
    >> inside the .jar file; what are the methods available, and the calling
    >> convention to those mothod functions?
    >>
    >> Is there such a debugger or disassembler in Java?
    >>
    >> thanks a lot


    nar, if you want to be blown away by a good decompiler, that can find dead
    code, and handle messed up class files you need

    djdec377.zip


    just do a search on the internet
    steve, Sep 7, 2004
    #7
    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. Achim Kühn
    Replies:
    2
    Views:
    2,015
    Mary Chipman
    Dec 18, 2003
  2. C Newby

    Disassembly Tab in Visual Studio

    C Newby, Jul 30, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    2,471
    C Newby
    Jul 30, 2003
  3. Hieronymus
    Replies:
    1
    Views:
    390
  4. Replies:
    4
    Views:
    513
    Victor Bazarov
    Mar 22, 2005
  5. Caveman

    Disassembly of C binary

    Caveman, Jan 10, 2006, in forum: C Programming
    Replies:
    6
    Views:
    280
    Chuck F.
    Jan 11, 2006
Loading...

Share This Page