Skip to content

xiongtx/jdecomp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

https://melpa.org/packages/jdecomp-badge.svg https://img.shields.io/badge/license-GPLv3-blue.svg

JDecomp

Introduction

jdecomp provides an interface to various Java decompilers. The current supported decompilers are:

Installation

Install via MELPA.

For general information on installing Emacs packages, see the Emacs Wiki.

Setup

In your init file, add the following to activate jdecomp-mode:

(jdecomp-mode 1)

Set customizable variable jdecomp-decompiler-type to a known decompiler type:

  • cfr (default)
  • fernflower
  • procyon

E.g.

(customize-set-variable 'jdecomp-decompiler-type 'fernflower)

Set customizable variable jdecomp-decompiler-paths to decompiler paths. E.g.

(customize-set-variable 'jdecomp-decompiler-paths
                        '((cfr . "~/Downloads/cfr_0_118.jar")
                          (fernflower . "~/idea-IC-162.1628.40/plugins/java-decompiler/lib/java-decompiler.jar")
                          (procyon . "~/procyon-decompiler-0.5.30.jar")))

Use M-x jdecomp-mode to turn the minor mode off, or call

(jdecomp-mode -1)

Features

Decompile classfiles

When jdecomp-mode is active, opening a Java classfile (including those in JARs) automatically decompiles the file and displays the result in a preview buffer.

Options

Set customizable variable jdecomp-decompiler-options to options for decompilers. E.g.

(customize-set-variable 'jdecomp-decompiler-options
                        '((cfr "--comments false" "--removeboilerplate false")
                          (fernflower "-hes=0" "-hdc=0")))

Future work

Support more decompilers:

Maybe others?

Other

This package is inspired by autodisass-java-bytecode.