java-runtime-decompiler - Man Page

Java Runtime Decompiler


  (./|start.bat) [-verbose] # launches GUI
  (./|start.bat) [-verbose] (-help|-h|-overwrite|-init)
  (./|start.bat) [-verbose] (-listclasses|-listdetails|-bytes|-base64bytes|-compile|-decompile|-api|-listjvms|-listplugins) [-saveas [-savelike]]


Standard options

-help, -h
Print this help text.

All exceptions and some debugging strings will be printed to standard error.

Print version project name, version and build timestamp.

List all local Java processes and their PIDs.

List all currently configured decompiler plugins and their statuses.

-listclasses <PUC> [<CLASS REGEX>...]
List all loaded classes of a process, optionally filtering them.

Only '-savelike exact' or '-savelike default' are allowed as saving modifiers.

-listdetails <PUC> [<CLASS REGEX>...]
Similar to -listclasses, only more details are printed about classes.

-base64bytes <PUC> <CLASS REGEX>...
Print Base64 encoded binary form of requested classes of a process.

-bytes <PUC> <CLASS REGEX>...
Print binary form of requested classes of a process

-compile [-p <PLUGIN>] [-cp <PUC>] [-r] <PATH>...
Compile local files against runtime classpath, specified by -cp.

Use -p to utilize some plugins' (like jasm or jcoder) bundled compilers.

Use -r for recursive search if <PATH> is a directory.

If the argument of '-saveas' is a valid PID or URL, the compiled code will be attempted to be injected into that process.

If multiple PATHs were specified, but no '-saveas', the process fails.

-decompile <PUC> <PLUGIN> <CLASS REGEX>...
Decompile and print classes of a process with the specified decompiler plugin.

Javap can be passed options by appending them without spaces: 'javap-v-public ...' executes as 'javap -v -public ...'

-overwrite <PUC> <FQN> [<CLASS FILE>]
Overwrite class of a process with new bytecode. If <CLASS FILE> is not set, standard input is used.

-init <PUC> <FQN>
Try to initialize a class in a running JVM (has no effect in FS VMs). Because class loading is lazy, the class you need might be missing, eg. java.lang.Override.

-api <PUC>
Will print out which can be used to insert fields/methods to running vm

Saving modifiers

-saveas <PATH>
All outputs will be written to PATH instead of to standard output.

-savelike <SAVE METHOD>
Specify how saving will behave.


All options can be with either one or two leading slashes ('-').

When using <CLASS REGEX>, escape dollar signs '$' of inner classes to '\$'; otherwise they mean the end-of-line.

<FQN> is the fully qualified name of a class as per the Java Language Specification ?6.7.

<PUC>, short for PidUrlClasspath, can be one of:

· local process PID

· remote process URL, in the format of 'hostname:port'

· classpath of JAR on the filesystem (classpath separator is ':')

<SAVE METHOD> can be one of:

· 'dir' - Result will be saved as '<PATH>/fully/qualified/name.class'. Default for .class binaries.

· 'fqn' - Result will be saved as '<PATH>/'. Default for .java sources.

· 'exact' - Result will be saved exactly to '<PATH>'. Default for everything else.

· 'default' - Saving uses the defaults mentioned above.