This discussion is archived
11 Replies Latest reply: Jul 20, 2010 11:03 PM by 843810 RSS

source code for deompilation java .class file

843810 Newbie
Currently Being Moderated
Hi Guys,
I am new to JAVA.I am working on Decompliation of a .class file.I have no idea about it.I am not getting any sort of source code from anywhere.

My aim is to retrive all the inforamtion including body of class ,methods code,almost like replica of original.I can not use decomplier available in market.i have to build my own code.....

Is there any API ,JAR and source code etc.available in market or do u have such code ? Pls help me out.


Any suggestion will be great for me.

Thanks,
Alok
alok_jis@yahoo.co.in
  • 1. Re: source code for deompilation java .class file
    EJP Guru
    Currently Being Moderated
    Your statements:
    I can not use decomplier available in market.
    and
    i have to build my own code.....
    and
    Is there any API ,JAR and source code etc.available in market or do u have such code?
    are mutally contradictory. If you have to build your own code that means you can't use anybody else's.

    EDIT: I locked two of your crossposts and removed the others, as they were in the most amazingly irrelevant forums I have ever seen. Please don't crosspost here: pick a forum and stick to it.

    Edited by: ejp on 20/07/2010 16:44
  • 2. Re: source code for deompilation java .class file
    843810 Newbie
    Currently Being Moderated
    Hi.
    May be my comment is contradictory.But i need some API or reference code .If i am in wrong forum .pls advise me correct one .

    I am looking forward to for your help.

    Thanks,
    Alok
  • 3. Re: source code for deompilation java .class file
    EJP Guru
    Currently Being Moderated
    May be my comment is contradictory.
    You don't understand. Self-contradictory propositions are logically meaningless.

    In this case you have a clear instruction to code it yourself. So do that. Asking for existing code in such a case is cheating. You wouldn't want us to help anybdy do that, would you ?
  • 4. Re: source code for deompilation java .class file
    843810 Newbie
    Currently Being Moderated
    I take my word.I am just new to java.Pls help me out........


    I really need code or API which i can use for my project........
    My intention is not cheat anybody..

    I am a poor fellow in Java..and coding....
  • 5. Re: source code for deompilation java .class file
    EJP Guru
    Currently Being Moderated
    So why were you told not to use public code?

    I don't know enough about your situation to judge whether you are cheating your boss or lecturer by ignoring this instruction, but I would say at the minimum you are certainly cheating yourself by avoiding an opportunity to learn something.
  • 6. Re: source code for deompilation java .class file
    jschellSomeoneStoleMyAlias Expert
    Currently Being Moderated
    ghoradim wrote:
    I take my word.I am just new to java.
    This task requires a great deal of prior knowledge before someone can attempt it. It requires programming basics and significant information beyond that to make any progress at all.

    A programmer that is experienced at a senior level in other programming languages might approach this as a learning task but other than that it would be beyond anyone else.
    I really need code or API which i can use for my project........
    I suspect that you meant that you didn't want to use a commercial product?
    However exactly what is your goal if you do not in fact want to write the decompiler yourself?
    You might google for BCEL
  • 7. Re: source code for deompilation java .class file
    843810 Newbie
    Currently Being Moderated
    It's very much correct ,it needs great deal of effort and knowledge of java programming.I am already working in an US IT firm.....so
    I do have knowledge of Java programming....

    I need some example ,any kind of help which leads me step by step.

    I am ready for any effort to be given for this....

    I hope ,you understand my eagerness to learn things like this...

    thanks
  • 8. Re: source code for deompilation java .class file
    843810 Newbie
    Currently Being Moderated
    It's very much correct ,it needs great deal of effort and knowledge of java programming.I am already working in an US IT firm.....so
    I do have knowledge of Java programming....

    I need some example ,any kind of help which leads me step by step.

    I am ready for any effort to be given for this....

    I hope ,you understand my eagerness to learn things like this...

    thanks
  • 9. Re: source code for deompilation java .class file
    843810 Newbie
    Currently Being Moderated
    Try to understand ....i am not cheating any body...I need help to start up the things........That's it....
  • 10. Re: source code for deompilation java .class file
    843810 Newbie
    Currently Being Moderated
    jschell wrote:
    You might google for BCEL
  • 11. Re: source code for deompilation java .class file
    jschellSomeoneStoleMyAlias Expert
    Currently Being Moderated
    ghoradim wrote:
    It's very much correct ,it needs great deal of effort and knowledge of java programming.I am already working in an US IT firm.....so
    I do have knowledge of Java programming....
    Perhaps you should start by getting someone where you work to assist you in writing a question about what it is that you actually want to do.

    The above statement contradicts something that you already said. You said you were "new to java" and now you said that you have "knowledge of Java programming".

    It cannot be both.
    I need some example ,any kind of help which leads me step by step.
    That isn't going to happen.

    It is a complex project which requires a lot of code. If you want to hire someone to write that then you might get a "step by step" process. Otherwise you will not.

    At the conceptual level.
    1. Read the class file.
    2. Interpret the class structure
    3. Generate a form from that
    4. Output that form.

    The fact that you might find tools will NOT help you if you are a not an experienced programmer.

    If you are an experienced programmer then all you should need is the Java Virtual Machine Specification which you can look up. If that is not sufficient then you do not have enough experience to succeed at this.