java:javap
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
java:javap [2023/04/12 15:16] – odefta | java:javap [2023/07/04 19:36] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 54: | Line 54: | ||
C: | C: | ||
</ | </ | ||
+ | |||
+ | <note tip>-c parameter is used to display the disassembled code.</ | ||
Result: | Result: | ||
Line 86: | Line 88: | ||
22: return | 22: return | ||
</ | </ | ||
- | |||
- | <note tip>-c parameter is used to display the disassembled code.</ | ||
As we can see in the parameter list of doStuff1 and doStuff2 methods, the generic types survived after compilation.\\ | As we can see in the parameter list of doStuff1 and doStuff2 methods, the generic types survived after compilation.\\ | ||
Some consistency checking information still remains in the binary.\\ | Some consistency checking information still remains in the binary.\\ | ||
But in the main method, the array list passed to the doStuff2 method does not contain any generic type after compilation. | But in the main method, the array list passed to the doStuff2 method does not contain any generic type after compilation. | ||
+ | |||
+ | ===== Use javap in Intellij IDEA ===== | ||
+ | |||
+ | Install the plugin "Class Decompile." | ||
+ | |||
+ | {{: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Next, right click on your class and select "Show Decompile Code" option. | ||
+ | Result: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ |
java/javap.1681301785.txt.gz · Last modified: 2023/07/04 19:36 (external edit)