• javap反编译


    原Java文件如:

    public class Hello{
    public static void main(String args[])
    {
       int a=0;
       a+=1;
      
    }
    }

    用javac将其编译,然后使用javap -c -v Hello反编译得到如下结果:

    Compiled from "Hello.java"
    public class Hello extends java.lang.Object
    SourceFile: "Hello.java"
    minor version: 0
    major version: 50
    Constant pool:
    const #1 = Method       #3.#12; // java/lang/Object."<init>":()V
    const #2 = class        #13;    // Hello
    const #3 = class        #14;    // java/lang/Object
    const #4 = Asciz        <init>;
    const #5 = Asciz        ()V;
    const #6 = Asciz        Code;
    const #7 = Asciz        LineNumberTable;
    const #8 = Asciz        main;
    const #9 = Asciz        ([Ljava/lang/String;)V;
    const #10 = Asciz       SourceFile;
    const #11 = Asciz       Hello.java;
    const #12 = NameAndType #4:#5;// "<init>":()V
    const #13 = Asciz       Hello;
    const #14 = Asciz       java/lang/Object;

    {
    public Hello();
    Code:
       Stack=1, Locals=1, Args_size=1
       0:   aload_0
       1:   invokespecial   #1; //Method java/lang/Object."<init>":()V
       4:   return
    LineNumberTable:
       line 1: 0


    public static void main(java.lang.String[]);
    Code:
       Stack=1, Locals=2, Args_size=1
       0:   iconst_0
       1:   istore_1
       2:   iinc    1, 1
       5:   return
    LineNumberTable:
       line 4: 0
       line 5: 2
       line 7: 5

    }

  • 相关阅读:
    flutter canvas 简单绘画直线
    Yapi 部署及遇到的坑
    flutter 时间选择器第三方插件返回时间格式说明
    windows + flutter + vscode 连接其他模拟器
    flutter 配置环境
    flutter 返回键监听
    flutter 自定义主题切换
    flutter Provide 状态管理篇
    flutter 本地存储 (shared_preferences)
    JS做倒计时的例题
  • 原文地址:https://www.cnblogs.com/macula7/p/1960531.html
Copyright © 2020-2023  润新知