Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
"javap -c" - Generate Assembler Instructions
How to disassembles bytecode of a Java class into assembler instructions.
✍: FYIcenter
If you want to disassemble bytecode of a Java class into assembler instructions,
you can use the "javap" command with the "-c" option.
1. Compile HelloWorldFrame.java used in the last tutorial into a bytecode file, HelloWorldFrame.class:
> javac HelloWorldFrame.java
2. Disassemble it using "javap" command with the "-c" option
> javap -c HelloWorldFrame.class
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 #7 // String Hello World!
7: putfield #9 // Field message:Ljava/lang/String;
10: aload_0
11: new #15 // class HelloWorldFrame$1
14: dup
15: aload_0
16: invokespecial #17 // Method HelloWorldFrame$1."<init>":(LHelloWorldFrame;)V
19: invokevirtual #20 // Method setContentPane:(Ljava/awt/Container;)V
22: aload_0
23: bipush 100
25: bipush 100
27: invokevirtual #24 // Method setSize:(II)V
30: return
public static void main(java.lang.String[]);
Code:
0: new #10 // class HelloWorldFrame
3: dup
4: invokespecial #28 // Method "<init>":()V
7: astore_1
8: aload_1
9: iconst_1
10: invokevirtual #29 // Method setVisible:(Z)V
13: return
}
2021-08-21, ∼1269🔥, 0💬
Popular Posts:
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
JDK 7 tools.jar is the JAR file for JDK 7 tools. It contains Java classes to support different JDK t...
maven-model-builder-3.8. 6.jaris the JAR file for Apache Maven 3.8.6 Model Builder module. Apache Ma...
What is ojdbc.jar - JDBC Driver for Oracle? ojdbc.jar is a JDBC driver from Oracle that provides dat...
JLayer is a library that decodes/plays/converts MPEG 1/2/2.5 Layer 1/2/3 (i.e. MP3) in real time for...