Class檔案二進位分析,class二進位分析

來源:互聯網
上載者:User

Class檔案二進位分析,class二進位分析

本篇博文描述的是對一個很簡單的java檔案的對應的class檔案的二進位分析.

要分析class檔案的二進位格式,必須瞭解對應版本的jvm specification.

由於jvm specification中關於class檔案的內容有點多,所以這裡不在描述相同的內容.

說明:本篇博文中設計的class檔案對應的jvm specification版本是 jvm 8.

java檔案:SimpleClassDemo1.java

package com.rocky.jvm.classfile;/** * Created by rocky on 14-12-23. */public class SimpleClassDemo1 {}


對應的class檔案二進位內容:SimpleClassDemo1.class (16進位表示)

cafe babe 0000 0034 0010 0a00 0300 0d07000e 0700 0f01 0006 3c69 6e69 743e 01000328 2956 0100 0443 6f64 6501 000f 4c696e65 4e75 6d62 6572 5461 626c 6501 00124c6f 6361 6c56 6172 6961 626c 6554 61626c65 0100 0474 6869 7301 002a 4c63 6f6d2f72 6f63 6b79 2f6a 766d 2f63 6c61 73736669 6c65 2f53 696d 706c 6543 6c61 73734465 6d6f 313b 0100 0a53 6f75 7263 6546696c 6501 0015 5369 6d70 6c65 436c 61737344 656d 6f31 2e6a 6176 610c 0004 00050100 2863 6f6d 2f72 6f63 6b79 2f6a 766d2f63 6c61 7373 6669 6c65 2f53 696d 706c6543 6c61 7373 4465 6d6f 3101 0010 6a617661 2f6c 616e 672f 4f62 6a65 6374 00210002 0003 0000 0000 0001 0001 0004 00050001 0006 0000 002f 0001 0001 0000 00052ab7 0001 b100 0000 0200 0700 0000 06000100 0000 0600 0800 0000 0c00 0100 00000500 0900 0a00 0000 0100 0b00 0000 02000c


分析結果如下: (直接帖文字會變形,所以截的圖.這裡提供下載:http://download.csdn.net/detail/u012358984/8319813)


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.