GithubHelp home page GithubHelp logo

jd-core-java's Introduction

JD-Core-java

JD-Core-java is a thin-wrapper for the Java Decompiler.

This is hack around the IntelliJ IDE plugin. It fakes the interfaces of the IDE, and provides access to JD-Core.

Since the Author of JD-Core is not willing to provide a library, as seen on this thread, and we all want to batch decompilation, this is pretty much our only option.

I hope this will motivate the author to release a proper library.

Supported Platforms

JD supports:

  • Linux 32/64-bit
  • Windows 32/64-bit
  • Mac OSX 32/64-bit on x86 hardware

But this wrapper only supports Linux 64-bit. Please ask if you want more, or better, make a pull request.

Build

Simply use:

make

I do not include the JD-Core library since the author of JD does not want to publish a library.

Building will download the JD-IntelliJ plugin from bitbucket, and copy the libjd-intellij.so library in the root directory of the project.

Once the project is built, the two files jd-core-java-1.0.jar libjd-intellij.so will be in the root directory of the project.

Usage

Programmatically:

/* Returns the source of SomeClass from compiled.jar as a String */
new jd.core.Decompiler.decompile("compiled.jar", "com/namespace/SomeClass.class");

/*
 * Returns the sources of all the classes in compiled.jar as a Map<String, String>
 * where the key is the class name (full path) and the value is the source
 */
new jd.core.Decompiler.decompile("compiled.jar");

/*
 * Returns the number of classes decompiled and saved into out_dir
 */
new jd.core.Decompiler.decompileToDir("compiled.jar", "out_dir");

From the command line:

# Outputs all the sources of compiled.jar into out_dir
java -jar jd-core-java.jar <compiled.jar> <out_dir>

License

JD-Core-java is released under the MIT license.

JD-IntelliJ is free for non-commercial use. This means that JD-IntelliJ shall not be included or embedded into commercial software products. Nevertheless, this project may be freely used for personal needs in a commercial or non-commercial environments.

jd-core-java's People

Contributors

aduchate avatar nviennot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.