Bytecode related products
- Start from the source code can then pass
javac
The command is available.class
This file is a binary file and cannot be opened by normal editors - from
.class
throughjavap
To get the parsing file of the bytecode (visualization) - Open it directly with HexDump (you can use the HexDump plugin in VS Code)
.class
You can see the binary code - With IDEA directly open, on the analysis of Java source code
Bytecode structure
- The structure of bytecode is layered and nested, and there are two main types,
- A typical 2-byte property (analogous to a basic data type in Java)
- Compound data structure with size of N bytes (analogous to Java Object)
- Magic number fixed as
cafe babe
Is used to determine whether or not.class
file - The ones marked green are the more important composite data structures
Class Name
.Super ClassName
.Interface Sets
Information determines the inheritance structure of the class