Skip to content
/ jdc Public

A JavaScript port of the JD-Core decompiler.

License

MIT, GPL-3.0 licenses found

Licenses found

MIT
LICENSE
GPL-3.0
LICENSE-JDC

run-slicer/jdc

Repository files navigation

jdc

A JavaScript port of the JD-Core decompiler.

Example

const fs = require("fs");
const { decompile } = require("./jdc.js"); // get it from the dist/ directory or jsDelivr

const data = fs.readFileSync("./your/package/HelloWorld.class"); // read a class file
console.log(await decompile("your/package/HelloWorld", {
    source: async (name) => {
        /* provide classes for analysis here, including the one you want to decompile */

        console.log(name); /* internal name, e.g. java/lang/Object */
        return name === "your/package/HelloWorld" ? data : null /* class not available */;
    },
    resources: [
        /* class names of supporting resources (libraries), which `source` can load */
        // "java/lang/Object",
    ],
    indent: "    ", // indentation string
}));

Or see the browser-based proof-of-concept in the docs directory.

Licensing

The supporting code for this project is licensed under the MIT License (supporting code. The JD-Core decompiler is licensed under the GNU General Public License, Version 3.

This project is not affiliated with, maintained or endorsed by the JD-Core project in any way. Do NOT report issues with this project to the JD-Core issue trackers.

About

A JavaScript port of the JD-Core decompiler.

Resources

License

MIT, GPL-3.0 licenses found

Licenses found

MIT
LICENSE
GPL-3.0
LICENSE-JDC

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages