4 Replies Latest reply: Sep 29, 2009 7:00 PM by jschellSomeoneStoleMyAlias RSS

    What is a reliable decompiler?

    843810
      Hello everyone,
      I am trying to decompile the classes in a jar file. I have already asked the creator of the classes if I can do this and he said yes, so I'm not trying to do anything unethical. I have tried a few java class decompilers (jad, JDec, JReversepro) and they all produce java code that can't be compiled: the java code has errors in it. I went over to sourceforge, and I have searched on the internet for java decompilers. There seems to be many decompilers out there. I was wondering has anyone ever decompiled classes with a perfect or almost perfect success? If so, what did you use? I'd rather just get a reliable decompiler than keep struggling with one fail after another.
      I hope it is ok asking this question here. I know it kind-of goes against the idea in this part of the forums. ;)

      Thanks for any help!
      Vance
        • 1. Re: What is a reliable decompiler?
          843810
          cell@tech wrote:
          I am trying to decompile the classes ...
          I have already asked the creator of the classes if I can do this and he said yes
          Just ask for the source code.
          • 2. Re: What is a reliable decompiler?
            jwenting
            If you'd had permission to use the source, you'd have had the source.
            • 3. Re: What is a reliable decompiler?
              843810
              I know it sound strange, but the author only distributes specific classes to people who want to alter the code, he won't release the full version. Here is my conversation with him to prove I'm not lying.

              My first note:
              Hey ******,
              +I was wondering if I could decompile the *** *classes so+
              that I could mess around with the software renderer. I thought maybe I
              could add some things that are new to Java since 1.1. I don't really
              have any concrete ideas, but I'd like to try. I wouldn't post whatever
              I might create on the forums without your approval, and I wouldn't
              mention what I am doing on the forums either.

              I've looked at
              other engines that I thought may have faster software rendering, but
              +they don't. And they are very complicated to learn and use compared to *****. So, I want to give *** *another shot, but maybe I could change+
              some stuff to suit my needs.

              Thanks,
              Vance

              His reply:
              Feel free to modify it, but be prepared for some heavily obfuscated and
              unrolled code in the software renderer. It's all about speed in there,
              nothing about readability. I suggest to use the ***** version that
              i've linked to in the end of this thread: *(I removed it)*
              because it contains some multicore optimizations that might be of interest for you.
              Let
              me know if you've improved something that could be beneficially to
              others. Alpha blending for the software renderer was added in exactly
              the same approach btw...

              My next note after I couldn't find a suitable decompiler:
              Hi ***********************,
              I have tried several decompilers, and each one produces in certain Java classes code that can't be compiled. I can't understand how to fix the errors in the code either.

              +So, I know **** is closed-source, and I respect your decision to keep it that way, since it is your project. I was wondering if it wouldn't be presumptuous to ask if you could share the source to ************* *with me. Like I said before, I wouldn't distribute the source to anyone or mention this to anyone else.+

              If you would rather not, then I will accept that. I will just keep looking for a decompiler that works.
              Thank-you,
              Vance

              His reply to my request for the source:
              I can send you a copy of the software renderer class. I did that before
              for some other guy who added the first version of the alpha blending to
              it and with the OpenGL renderer for some guy you wrote the first jogl
              port.
              The "problem" is, that the software renderer is undergoing
              major changes right now. It would prefer to send you a version that i
              consider to be more or less final for a release, which the current one
              isn't. I'll keep you posted...

              I replaced the software's name, his name, and the version number with **** to honor what I said about not telling about this.
              If anyone can help me thanks!
              Vance

              Edited by: cell@tech on Sep 28, 2009 5:21 AM
              • 4. Re: What is a reliable decompiler?
                jschellSomeoneStoleMyAlias
                cell@tech wrote:
                I know it sound strange, but the author only distributes specific classes to people who want to alter the code, he won't release the full version. Here is my conversation with him to prove I'm not lying.

                I thought maybe I could add some things that are new to Java since 1.1. I don't really+
                ...
                because it contains some multicore optimizations that might be of interest for you
                It hasn't been updated since java 1.1? And it had some optimizations for that?

                I would suppose that one would need to write the entire library from scratch.
                Feel free to modify it, but be prepared for some heavily obfuscated
                It isn't clear that term is being used correctly. If it is then a decompiler is not going to be much help.
                If anyone can help me thanks!
                Another fairly recent thread had one post about a decompiler that was reported to be decent. It costs money but reported (in that reply) not a lot.