[TUT][Windows] Decompile your own java classes (Use only on your own plugin!)

Discussion in 'Resources' started by GameplayJDK, Mar 21, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    GameplayJDK

    First I want to say, this is a tutorial on how to decompile classes. But do not steal somebody's code!

    In this example I will use the jad decompiler.

    So let us start now:
    1. Download and set your compiler up. Also get a program like 7zip if you need to extract classes out of a jar file. This should be easy for everyone and if not, learn how to install programs on your computer ;)
    2. (In our case with jad:) Move your class file(s) to the same directory as jad .
    3. Press [WIN] + [R] and type in: "cmd". Then press enter.
    4. Use the cmd command "cd" to navigate to the directory of jad.
    5. Then type in "jad <classname>" (<classname> is the name of the class file you want to decompile)
    6. Now a file <classname>.java should be created in the directory, which contains the source of the class.

    This was my first tutorial, so feel free to post suggestion :)
     
  2. Offline

    Garris0n

    Decompiling somebody's plugin and stealing their code are two different things. You look through somebody's code to understand how it works without stealing it.
     
  3. Offline

    MrInspector

    Also why would you need to decompile your own plugin? (Not being rude or anything, but I find it a bit useless since you already have it in your workspace)
     
  4. Offline

    GameplayJDK

    Garris0n
    Edited it :)
    MrInspector If you delete your workspace by accident, that happened to me once, and to recover the code you can decompile your own classes. (Or just export your plugin with source, that's what I do :) )
     
  5. Offline

    Not2EXceL

    jad is ancient
     
  6. Offline

    GameplayJDK

    Not2EXceL
    I've never used another decompiler :)
    No matter if it's ancient or not, it's working.
     
  7. Offline

    L33m4n123


    Github. Or if you want free private repos. Bitbucket
     
  8. Offline

    MrInspector

    Ah okay, I guess that's one possible cause. :p
     
  9. Offline

    GameplayJDK

  10. Offline

    xTrollxDudex

  11. Offline

    Garris0n

    Yes, but they should. I personally can't stand BitBucket, though.
     
  12. Offline

    LCastr0

    There's a software called jd-gui. You simply put your .jar files there, and ta-da!
     
  13. Offline

    GameplayJDK

    LCastr0
    Yes, there are other tools which can decompile too, but in this example I use jad (as I used jd-gui the last time, it crashed for some reason)..
     
  14. Offline

    RawCode

    I can't tell "this tutorial stupid and useless and reproduces JAD's readme.txt shipped with JAD jar" since you will report my post and i will get one more infraction for trolling. (can't agree, this is development forum, not forum for brainwashed who unable to perform basic operations without tutorial).

    I will tell:
    This is very usefull tutorial i always wanted to decompile random class from random plugin and now i can do it.
    Please accept this youtube video as my gift:

    It will explain how usefull your tutorial is.

    Looks like i need to start some usefull thread myself, there is completely nothing usefull on 4 latest pages expect cowbug usage samples.
     
    Garris0n and user_90854156 like this.
Thread Status:
Not open for further replies.

Share This Page