JAVAP(1)
π javap(1) β disassemble one or more class files π
okay so this page is literally from the JDK Commands fam, and the manual name is javap(1) β today weβre disassembling class files, bestie. π«Ά
πΈ NAME πΈ
javap β disassemble one or more class files. periodt. π
β¨ SYNOPSIS β¨
javap [options] classes...
optionsβ specifies the command-line options. See theOPTIONS FOR JAVAPsection, okay?classesβ specifies one or more classes separated by spaces to be processed for annotations. You can specify a class that can be found in the class path by its file name, URL, or by its fully qualified class name.
Examples:
path/to/MyClass.class
jar:file:///path/to/MyJar.jar!/mypkg/MyClass.class
java.lang.Object
π¦ DESCRIPTION π¦
The javap command disassembles one or more class files. The output depends on the options used. When no options are used, the javap command prints the package private, protected, and public fields and methods declared in the classes passed to it. iconic behavior, honestly. β¨
The javap command isn't multirelease JAR aware. Using the class path form of the command results in viewing the base entry in all JAR files, multirelease or not. Using the URL form, you can use the URL form of an argument to specify a specific version of a class to be disassembled. no cap, thatβs the whole vibe check. π«Ά
The javap command prints its output to stdout. π»
π Note: In tools that support--style options, the GNU-style options can use the equal sign (=) instead of a white space to separate the name of an option from its value.
π OPTIONS FOR JAVAP π
--help,-help,-h, or-?β prints a help message for thejavapcommand. so helpful, bestie. π-versionβ prints release information.-verboseor-vβ prints additional information about the selected class.-lβ prints line and local variable tables.-publicβ shows only public classes and members.-protectedβ shows only protected and public classes and members.-packageβ shows package/protected/public classes and members (default).-privateor-pβ shows all classes and members.-cβ prints disassembled code, for example, the instructions that comprise the Java bytecodes, for each of the methods in the class. this is the main character option ngl. π₯-sβ prints internal type signatures.-sysinfoβ shows system information (path, size, date, SHA-256 hash) of the class being processed.-verifyβ prints additional class verification info.-constantsβ shows static final constants.--module moduleor-m moduleβ specifies the module containing classes to be disassembled.--module-path pathβ specifies where to find application modules.--system jdkβ specifies where to find system modules.--class-path path,-classpath path, or-cp pathβ specifies the path that thejavapcommand uses to find user class files. It overrides the default or theCLASSPATHenvironment variable when it's set.-bootclasspath pathβ overrides the location of bootstrap class files.--multi-release versionβ specifies the version to select in multi-release JAR files.-Joptionβ passes the specified option to the JVM. For example:
javap -J-version
javap -J-Djava.security.manager -J-Djava.security.policy=MyPolicy MyClassName
See Overview of Java Options in java. π«Ά
π JAVAP EXAMPLE π
Compile the following HelloWorldFrame class:
import java.awt.Graphics;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class HelloWorldFrame extends JFrame {
String message = "Hello World!";
public HelloWorldFrame(){
setContentPane(new JPanel(){
@Override
protected void paintComponent(Graphics g) {
g.drawString(message, 15, 30);
}
});
setSize(100, 100);
}
public static void main(String[] args) {
HelloWorldFrame frame = new HelloWorldFrame();
frame.setVisible(true);
}
}
The output from the javap HelloWorldFrame.class command yields the following:
Compiled from "HelloWorldFrame.java"
public class HelloWorldFrame extends javax.swing.JFrame {
java.lang.String message;
public HelloWorldFrame();
public static void main(java.lang.String[]);
}
The output from the javap -c HelloWorldFrame.class command yields the following:
Compiled from "HelloWorldFrame.java"
public class HelloWorldFrame extends javax.swing.JFrame {
java.lang.String message;
public HelloWorldFrame();
Code:
0: aload_0
1: invokespecial #1 // Method javax/swing/JFrame."<init>":()V
4: aload_0
5: ldc #2 // String Hello World!
7: putfield #3 // Field message:Ljava/lang/String;
10: aload_0
11: new #4 // class HelloWorldFrame$1
14: dup
15: aload_0
16: invokespecial #5 // Method HelloWorldFrame$1."<init>":(LHelloWorldFrame;)V
19: invokevirtual #6 // Method setContentPane:(Ljava/awt/Container;)V
22: aload_0
23: bipush 100
25: bipush 100
27: invokevirtual #7 // Method setSize:(II)V
30: return
public static void main(java.lang.String[]);
Code:
0: new #8 // class HelloWorldFrame
3: dup
4: invokespecial #9 // Method "<init>":()V
7: astore_1
8: aload_1
9: iconst_1
10: invokevirtual #10 // Method setVisible:(Z)V
13: return
}
Source/version: JDK 27-ea Β· date: 2026 Β· page: javap(1) β xoxo bestie, go disassemble something cute. ππ
π¦ where this page comes from
- epel 10: java-latest-openjdk-devel 1:27.0.0.0.35-0.0.1.0.ea.el10_3 Β· Apache-1.1 AND Apache-2.0 AND LicenseRef-Callaway-BSD AND LicenseRef-Callaway-BSD-with-advertising AND GPL-1.0-or-later AND GPL-2.0-only AND LicenseRef-Callaway-GPLv2-with-exceptions AND IJG AND LicenseRef-Callaway-LGPLv2+ AND LicenseRef-Callaway-MIT AND MPL-2.0 AND LicenseRef-Callaway-Public-Domain AND W3C AND Zlib AND ISC AND FTL AND LicenseRef-RSA
- epel 10: java-latest-openjdk-devel-fastdebug 1:27.0.0.0.35-0.0.1.0.ea.el10_3 Β· Apache-1.1 AND Apache-2.0 AND LicenseRef-Callaway-BSD AND LicenseRef-Callaway-BSD-with-advertising AND GPL-1.0-or-later AND GPL-2.0-only AND LicenseRef-Callaway-GPLv2-with-exceptions AND IJG AND LicenseRef-Callaway-LGPLv2+ AND LicenseRef-Callaway-MIT AND MPL-2.0 AND LicenseRef-Callaway-Public-Domain AND W3C AND Zlib AND ISC AND FTL AND LicenseRef-RSA
- epel 10: java-latest-openjdk-devel-slowdebug 1:27.0.0.0.35-0.0.1.0.ea.el10_3 Β· Apache-1.1 AND Apache-2.0 AND LicenseRef-Callaway-BSD AND LicenseRef-Callaway-BSD-with-advertising AND GPL-1.0-or-later AND GPL-2.0-only AND LicenseRef-Callaway-GPLv2-with-exceptions AND IJG AND LicenseRef-Callaway-LGPLv2+ AND LicenseRef-Callaway-MIT AND MPL-2.0 AND LicenseRef-Callaway-Public-Domain AND W3C AND Zlib AND ISC AND FTL AND LicenseRef-RSA
- epel 9: java-latest-openjdk-devel 1:27.0.0.0.35-0.0.1.0.ea.el9 Β· Apache-1.1 AND Apache-2.0 AND LicenseRef-Callaway-BSD AND LicenseRef-Callaway-BSD-with-advertising AND GPL-1.0-or-later AND GPL-2.0-only AND LicenseRef-Callaway-GPLv2-with-exceptions AND IJG AND LicenseRef-Callaway-LGPLv2+ AND LicenseRef-Callaway-MIT AND MPL-2.0 AND LicenseRef-Callaway-Public-Domain AND W3C AND Zlib AND ISC AND FTL AND LicenseRef-RSA
- epel 9: java-latest-openjdk-devel-fastdebug 1:27.0.0.0.35-0.0.1.0.ea.el9 Β· Apache-1.1 AND Apache-2.0 AND LicenseRef-Callaway-BSD AND LicenseRef-Callaway-BSD-with-advertising AND GPL-1.0-or-later AND GPL-2.0-only AND LicenseRef-Callaway-GPLv2-with-exceptions AND IJG AND LicenseRef-Callaway-LGPLv2+ AND LicenseRef-Callaway-MIT AND MPL-2.0 AND LicenseRef-Callaway-Public-Domain AND W3C AND Zlib AND ISC AND FTL AND LicenseRef-RSA
- epel 9: java-latest-openjdk-devel-slowdebug 1:27.0.0.0.35-0.0.1.0.ea.el9 Β· Apache-1.1 AND Apache-2.0 AND LicenseRef-Callaway-BSD AND LicenseRef-Callaway-BSD-with-advertising AND GPL-1.0-or-later AND GPL-2.0-only AND LicenseRef-Callaway-GPLv2-with-exceptions AND IJG AND LicenseRef-Callaway-LGPLv2+ AND LicenseRef-Callaway-MIT AND MPL-2.0 AND LicenseRef-Callaway-Public-Domain AND W3C AND Zlib AND ISC AND FTL AND LicenseRef-RSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms