• Stars
    star
    257
  • Rank 158,728 (Top 4 %)
  • Language
    Java
  • Created about 12 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Java Library for JD-Core, a java decompiler

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, 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: https://github.com/java-decompiler/jd-core

Supported Platforms

JD supports:

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

Build

Clone the repository and run ./gradlew assemble. This will download the necessary native libraries from the JD Intellij repository on Bitbucket, compile the wrapper code, and generate a jar file containing both in the build/libs directory.

This is a self-contained jar that you may include in your own Java project, or alternatively you may run it from the command line.

Usage

Programmatically:

/* Returns the source of SomeClass from compiled.jar as a String */
new jd.core.Decompiler().decompileClass("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-1.2.jar [options] <compiled.jar> [<destination>]
Options:
    -z - save sources into a zip file
    -n - add line numbers into sources; (false by default)
    -r - not realign line numbers (true by default)

Contributors

Leslie Hoare wrote the cross platform and self contrained jar code.

License

JD-Core-java is released under the GPLv3 License.

JD-Core, JD-GUI & JD-Eclipse are open source projects released under the GPLv3 License.

More Repositories

1

core-to-core-latency

Measures the latency between CPU cores
Jupyter Notebook
1,078
star
2

playdrone

Google Play Crawler
Ruby
420
star
3

stm32-emulator

Rust
358
star
4

turbo-resin

Open-source firmware for resin printers
Rust
210
star
5

irb-config

Enhances your Ruby REPL. Supports rails, mongoid, rspec and cucumber
Ruby
139
star
6

android-checkin

Pretends to be a phone to get a legit android_id
Java
133
star
7

rspec-console

Run RSpec tests in your rails console
Ruby
101
star
8

reversing-mono4k

Reverse engineering of the Anycubic Mono 4K
BASIC
79
star
9

easy-finance

Personal finance accounting tool
JavaScript
79
star
10

vim-config

The Vim config I use
Vim Script
46
star
11

tmux-config

The tmux config I use
Makefile
45
star
12

mongoid_lazy_migration

Lazy Migrate your MongoDB documents to avoid downtime
Ruby
34
star
13

playdrone-kitchen

Kitchen for the Google Play Crawler cluster
Ruby
27
star
14

nginx-tcp-keepalive

Nginx TCP Keepalive configuration module
C
21
star
15

zsh-vim-plugin

Shell
20
star
16

tinyusb-sys-rs

Rust wrapper for the TinyUSB library
Rust
17
star
17

objc-tracer

Objective-C method call tracer
C
15
star
18

libscribe

Scribe user-space library
C
12
star
19

py-scribe

Scribe python bindings and Scribe userspace tools
Python
9
star
20

run_as_exe

C
8
star
21

tests-scribe

Test suite for Scribe
C
6
star
22

youtube-audio

Web service to stream the audio out of a youtube video in real time
Ruby
4
star
23

symbol_decoration

Support for Ruby symbol decorations such as where(:field.in => [1,2,3])
Ruby
3
star
24

stm32-gpio-monitor

Monitor the GPIO of a STM32 live
Rust
3
star
25

cflat

C Flat compiler
OCaml
3
star
26

cucumber-console

Run Cucumber tests in your console
Ruby
3
star
27

rails-env-switcher

Switch from a Rails environment to another
Ruby
3
star
28

thesis

My PhD thesis
TeX
2
star
29

abricot

Fast cloud command dispatcher tool with Redis pub/sub
Ruby
2
star
30

libssh

fork of libssh (bug fixes)
C
2
star
31

candy-crusher

Bot for candy crush
Ruby
2
star
32

edeliver-build-docker

docker image for edeliver
2
star
33

velvetpulse

My blog
CSS
1
star
34

mongoid-colors

Colorize your Mongoid traces
Ruby
1
star
35

synapse-benchmark

Ruby
1
star