This discussion is archived
1 2 Previous Next 16 Replies Latest reply: May 1, 2011 2:15 PM by jschellSomeoneStoleMyAlias RSS

Java Decompiler

SRAVZ Newbie
Currently Being Moderated
Hi All


Could anyone tell me the best java decompiler in use?

Thanks
Snini
  • 1. Re: Java Decompiler
    793415 Pro
    Currently Being Moderated
    user11138361 wrote:
    ..Could anyone tell me the best java decompiler in use?
    In most cases, this question is asked about code in one of two conditions:
    <ol>
    <li>The code is not open source, in which case the authors almost certainly do not want the binary decompiled.
    <li>The API is abandoned, the source code lost.
    </ol>

    Which of those two apply here, or is there a third possibility I missed?

    In the first case, don't. Instead submit a bug report or RFE to the authors. In the 2nd case, it is time to end use of that abandoned API and write it fresh.
    --------------------------------------
    BTW - it is Java, not java.
  • 2. Re: Java Decompiler
    SRAVZ Newbie
    Currently Being Moderated
    It is java, i compile a java file which generates the class file and now i want open the class file. My question is there any tool which does this?

    I tied to google it but wanted to know which is the best one.
  • 3. Re: Java Decompiler
    DrClap Expert
    Currently Being Moderated
    The name of the language is "Java". Not "java". As you should be able to tell by looking at the names of various forums here.

    So you googled and found some decompilers? You don't tell us which ones, but you still want to know which is "best"? How should we know? You don't provide us a list to choose from, and you don't say what kind of "best" you're looking for.

    I would recommend trying them and seeing which one works the best for you. Whatever that might mean to you.
  • 4. Re: Java Decompiler
    796440 Guru
    Currently Being Moderated
    user11138361 wrote:
    It is java, i compile a java file which generates the class file and now i want open the class file. My question is there any tool which does this?
    Pointless. If you have the .java file, then you have everything you could get, and more, from decompiling the class file. Maybe if you could clearly describe the problem you are trying to solve...
  • 5. Re: Java Decompiler
    supratim Newbie
    Currently Being Moderated
    I have been using jd-gui[Java Decompiler] for a long time .

    It also comes with eclipse plugin, or you can use it for separate application. It can easily break into jar files,decompile .class files and even normal eclipse like look with key shortcuts are there. You can search through jar files or see the methods typing CTRL+SHIFT+O.

    download here...

    http://java.decompiler.free.fr/?q=jdgui
  • 6. Re: Java Decompiler
    858518 Newbie
    Currently Being Moderated
    I've been using JAD decompiler plugin for IntelliJ IDEA. It's quite good.
  • 7. Re: Java Decompiler
    gimbal2 Guru
    Currently Being Moderated
    You do realize this thread is a trap and all your user information is being collected? So how long have you people been stealing other people's code now? Just to complete the picture.
  • 8. Re: Java Decompiler
    858518 Newbie
    Currently Being Moderated
    Hi gimbal2. Decompiler is not a tool for stealing other people's code. It may be very helpful in normal development, for example debuging libraries.
  • 9. Re: Java Decompiler
    gimbal2 Guru
    Currently Being Moderated
    855515 wrote:
    Hi gimbal2. Decompiler is not a tool for stealing other people's code. It may be very helpful in normal development, for example debuging libraries.
    You are still stealing. Either the API is open source, or it is closed source and you need to pay for support. Check the license that goes with said APIs before breaking and entering.
  • 10. Re: Java Decompiler
    800381 Explorer
    Currently Being Moderated
    gimbal2 wrote:
    855515 wrote:
    Hi gimbal2. Decompiler is not a tool for stealing other people's code. It may be very helpful in normal development, for example debuging libraries.
    You are still stealing. Either the API is open source, or it is closed source and you need to pay for support. Check the license that goes with said APIs before breaking and entering.
    WRONG.

    See the part about "adapation" in http://www.copyright.gov/title17/92chap1.html#117

    § 117. Limitations on exclusive rights: Computer programs54

    (a) Making of Additional Copy or Adaptation by Owner of Copy. — Notwithstanding the provisions of section 106, it is not an infringement for the owner of a copy of a computer program to make or authorize the making of another copy or adaptation of that computer program provided:

    (1) that such a new copy or adaptation is created as an essential step in the utilization of the computer program in conjunction with a machine and that it is used in no other manner, or

    (2) that such new copy or adaptation is for archival purposes only and that all archival copies are destroyed in the event that continued possession of the computer program should cease to be rightful.

    (b) Lease, Sale, or Other Transfer of Additional Copy or Adaptation. — Any exact copies prepared in accordance with the provisions of this section may be leased, sold, or otherwise transferred, along with the copy from which such copies were prepared, only as part of the lease, sale, or other transfer of all rights in the program. Adaptations so prepared may be transferred only with the authorization of the copyright owner.

    (c) Machine Maintenance or Repair. — Notwithstanding the provisions of section 106, it is not an infringement for the owner or lessee of a machine to make or authorize the making of a copy of a computer program if such copy is made solely by virtue of the activation of a machine that lawfully contains an authorized copy of the computer program, for purposes only of maintenance or repair of that machine, if —

    (1) such new copy is used in no other manner and is destroyed immediately after the maintenance or repair is completed; and

    (2) with respect to any computer program or part thereof that is not necessary for that machine to be activated, such program or part thereof is not accessed or used other than to make such new copy by virtue of the activation of the machine.

    (d) Definitions. — For purposes of this section —

    (1) the “maintenance” of a machine is the servicing of the machine in order to make it work in accordance with its original specifications and any changes to those specifications authorized for that machine; and

    (2) the “repair” of a machine is the restoring of the machine to the state of working in accordance with its original specifications and any changes to those specifications authorized for that machine.
  • 11. Re: Java Decompiler
    jduprez Pro
    Currently Being Moderated
    user5287726 wrote:
    gimbal2 wrote:
    855515 wrote:
    Hi gimbal2. Decompiler is not a tool for stealing other people's code. It may be very helpful in normal development, for example debuging libraries.
    You are still stealing. Either the API is open source, or it is closed source and you need to pay for support. Check the license that goes with said APIs before breaking and entering.
    WRONG.

    See the part about "adapation" in http://www.copyright.gov/title17/92chap1.html#117

    § 117. Limitations on exclusive rights: Computer programs54

    (a) Making of Additional Copy or Adaptation by Owner of Copy. — Notwithstanding the provisions of section 106, it is not an infringement for the owner of a copy of a computer program to make or authorize the making of another copy or adaptation of that computer program provided (...)
    OK, it is not an infringement of the Copyright Law ; it may still be an infringement of the license, that imposes more stringent usage/distribution/adaptation conditions.

    Besides, this law is only applicable on the US territory. I understand that you are working there, but that is not everyone's case on this forum, and that may not even be the Op's case (I only notice now that you are not the OP, this damn userXYZ profile naming is a shame for Oracle).

    Eventually, this paragraph doesn't say anything about redistributing the adapted version: if you're using the modified lib on an in-house application, fine, still it doesn't allow you to sell a package that includes the modified version.

    So your answer is not a general statement about licenses in general, only a statement about a specific law on a specific territory in a specific case.
  • 12. Re: Java Decompiler
    jduprez Pro
    Currently Being Moderated
    You are still stealing. Either the API is open source, or it is closed source and you need to pay for support.
    Not technically a valid third possibility, merely a case where I bent the rules of the "closed source with paid support", but:
    I once had to decompile two versions of a patched jar of a famous AS to convince the (duly paid) AS vendor support that the "cumulative patch including all previous patches" they had delivered lately did not embed the second-to-last former patch.

    I don't remember whether I told them I had decompiled the jar, maybe I pretended to have "proof-read the javap output" ;) , but they sure didn't turn all red (not at that time) when I pointed out their error, and we rapidly reached a solution.

    By the way, to OP, I used the JAD decompiler and a JAD-plugin for the diff tool (Beyond & Compare), the latter being a marvelous combination to compare jar contents. Of course don't use it to perform anything illegal.
    Check the license that goes with said APIs before breaking and entering.
    ++
  • 13. Re: Java Decompiler
    DrClap Expert
    Currently Being Moderated
    Not necessarily stealing. I once had to decompile my own classes, when the dog ate my source code.

    (Now I have a proper source code repository, so the issue is much less likely to arise.)
  • 14. Re: Java Decompiler
    jschellSomeoneStoleMyAlias Expert
    Currently Being Moderated
    user5287726 wrote:
    gimbal2 wrote:
    855515 wrote:
    Hi gimbal2. Decompiler is not a tool for stealing other people's code. It may be very helpful in normal development, for example debuging libraries.
    You are still stealing. Either the API is open source, or it is closed source and you need to pay for support. Check the license that goes with said APIs before breaking and entering.
    WRONG.

    See the part about "adapation" in http://www.copyright.gov/title17/92chap1.html#117

    § 117. Limitations on exclusive rights: Computer programs54

    (a) Making of Additional Copy or Adaptation by Owner of Copy. — Notwithstanding the provisions of section 106, it is not an infringement for the owner of a copy of a computer program to make or authorize the making of another copy or adaptation of that computer program provided:
    I suggest that if you want to claim that decompiling is the same as copying that you had better find a very good (expensive) lawyer that agrees with your argument before you actually proceed.
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points