How to decompile java class files

--Environment --Windows10 64bit version 1903 - Eclipse Version: 2019-12 (4.14)

Install the Java decompiler

  1. Download Jad 1.5.8g for Windows 9x-NT-2000 on Intel platform.zip from JAD Decompiler Download
  2. Unzip the zip
  3. Store the jad.exe from the zip in $ JAVA_HOME / bin -OK through PATH without entering $ JAVA_HOME

It's OK if something like help comes out with jad


$ jad
Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov ([email protected]).
Usage:    jad [option(s)] <filename(s)>
Options: -a       - generate JVM instructions as comments (annotate)
...abridgement...

Decompile class files

# 1.Check the location of the class file
$ find /c/app/pleiades/workspace/ponsuke/ -type f -name PonsukeMain.*                                                                             /c/app/pleiades/workspace/ponsuke/src/main/java/ponsuke/PonsukeMain.java
/c/app/pleiades/workspace/ponsuke/target/classes/ponsuke/PonsukeMain.class

# 2.Decompile
$ jad -a /c/app/pleiades/workspace/ponsuke/target/classes/ponsuke/PonsukeMain.class
Parsing C:/app/pleiades/workspace/ponsuke/target/classes/ponsuke/PonsukeMain.class... Generating PonsukeMain.jad

# 3.A decompiled jad file will be output to the current location, so view it with an editor etc.
$ ls -la | grep PonsukeMain
-rw-r--r--1 ponsuke 197609 3296 April 2 23:32 PonsukeMain.jad

Recommended Posts

How to decompile java class files
How to disassemble Java class files
How to use java class
Decompile class files
[Java] How to use LinkedHashMap class
How to use class methods [Java]
[Java] How to use Math class
[Java] How to use the HashMap class
[Java] How to output and write files!
[Processing × Java] How to use the class
How to use Java Scanner class (Note)
[Java] How to use the Calendar class
[Java] How to use FileReader class and BufferedReader class
How to get Class from Element in Java
How to convert a solidity contract to a Java contract class
[Java] How to use Calendar class and Date class
[Java] How to use Map
How to lower java version
[Java] How to use Map
How to uninstall Java 8 (Mac)
Java --How to make JTable
How to write java comments
[Java] How to use Optional ②
[Java] How to use removeAll ()
[Java] How to display Wingdings
How to use Java Map
How to set Java constants
How to use Java variables
How to convert Java radix
[Java] How to implement multithreading
[Java] How to use Optional ①
How to initialize Java array
How to rollback migration files
[Java] How to use compareTo method of Date class
How to input / output IBM mainframe files in Java?
How to get the class name / method name running in Java
How to study Java Silver SE 8
How to use Java HttpClient (Get)
How to decompile apk file to java source code with MAC
Studying Java # 6 (How to write blocks)
[Java] How to update Java on Windows
How to make a Java container
How to use Java HttpClient (Post)
[Java] How to use join method
How to use the wrapper class
How to learn JAVA in 7 days
Decompile Java
[Processing × Java] How to use variables
[Java] How to create a folder
[JavaFX] [Java8] How to use GridPane
How to write Java variable declaration
JAVA decompile (decompile)
[Java] How to use List [ArrayList]
How to use classes in Java?
How to name variables in Java
How to pass Oracle Java Silver
How to turn Iterator Dojo (Java)
java Eclipse How to debug javaScript
[Processing × Java] How to use arrays
How to play MIDI files using the Java Sound API
How to make a Java array