C++ class to parse java .class file

Discussion in 'C++' started by wolverine, Mar 26, 2007.

  1. wolverine

    wolverine Guest

    Hi,
    I recently read that every java .class file, is written in a
    specific binary format.
    http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html

    I just want to know whether there is any C++ class for extracting
    those structure information from a .class file . I am NOT speaking
    about decompiling the java class. I just want to parse and extract
    some information from the .class file.

    Thanks in Advance
    Kiran.
     
    wolverine, Mar 26, 2007
    #1
    1. Advertisements

  2. wolverine wrote:
    > Hi,
    > I recently read that every java .class file, is written in a
    > specific binary format.
    > http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html
    >
    > I just want to know whether there is any C++ class for extracting
    > those structure information from a .class file . I am NOT speaking
    > about decompiling the java class. I just want to parse and extract
    > some information from the .class file.


    You might find it useful to ask about it in a Java newsgroup. After
    all, C++ knows nothing about .class files, it's all defined in the
    Java language specification, and that's why a Java forum is a more
    likely place where you can find a solution for parsing .class files.

    V
    --
    Please remove capital 'A's when replying by e-mail
    I do not respond to top-posted replies, please don't ask
     
    Victor Bazarov, Mar 26, 2007
    #2
    1. Advertisements

  3. wolverine

    rossum Guest

    On 26 Mar 2007 07:21:53 -0700, "wolverine" <>
    wrote:

    >Hi,
    > I recently read that every java .class file, is written in a
    >specific binary format.
    >http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html
    >
    > I just want to know whether there is any C++ class for extracting
    >those structure information from a .class file . I am NOT speaking
    >about decompiling the java class. I just want to parse and extract
    >some information from the .class file.
    >
    >Thanks in Advance
    >Kiran.

    In principle, a C++ program can be written to parse any specified
    format of binary file. Whether anyone has written such a parser for
    Java .class files is another question. As Victor says, you are much
    more likely to find such a parser in a Java newsgroup. It will
    probably be written in Java, but that should be easy enough to convert
    to C++ if you really require something written in C++.

    An alternative would be to find a general purpose parser in C++ and
    adapt that to handle the specifics of your target file type.

    rossum
     
    rossum, Mar 26, 2007
    #3
    1. Advertisements

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. John M. Lembo

    Parse Text File and Output to File

    John M. Lembo, Aug 1, 2003, in forum: Perl
    Replies:
    0
    Views:
    12,906
    John M. Lembo
    Aug 1, 2003
  2. Stuart Miller
    Replies:
    2
    Views:
    1,701
    Stuart Miller
    Aug 3, 2004
  3. E11
    Replies:
    1
    Views:
    5,667
    Thomas Weidenfeller
    Oct 12, 2005
  4. Stuart Miller
    Replies:
    0
    Views:
    907
    Stuart Miller
    Jul 26, 2004
  5. Replies:
    19
    Views:
    1,401
    Daniel Vallstrom
    Mar 15, 2005
  6. Thomas Armstrong
    Replies:
    7
    Views:
    638
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Sep 30, 2007
  7. Replies:
    55
    Views:
    3,844
    Andrew Thompson
    May 26, 2009
  8. 7stud --

    optparse: parse v. parse! ??

    7stud --, Feb 20, 2008, in forum: Ruby
    Replies:
    3
    Views:
    346
    7stud --
    Feb 20, 2008
Loading...