源代码:
public class Math { public static void main(String[] args){ int a=1; int b=2; int c=(a+b)*10; }}
1 用Oolong工具将java字节码翻译为类汇编语言
.source Math.java.class public super Math.super java/lang/Object.method public()V.limit stack 1.limit locals 1.line 1l0: aload_0l1: invokespecial java/lang/Object/ ()Vl4: return.end method.method public static main ([Ljava/lang/String;)V.limit stack 2.limit locals 4.line 4l0: iconst_1l1: istore_1.line 5l2: iconst_2l3: istore_2.line 6l4: iload_1l5: iload_2l6: iaddl7: bipush 10l9: imull10: istore_3.line 7l11: return.end method
2 java –verbose查看运行类是加载了那些jar文件
3 javap查看字节码