Mobilefish.com Online Java Class Decompiler
Author: Robert Lie
Version: 0.1 (pre-alpha)
https://www.mobilefish.com/services/java_decompiler/java_decompiler.php

More information about the Java class file format can be found at:
https://www.mobilefish.com/tutorials/java/java_quickguide_classfile.html
Analysis report of HelloWorld.class
Generated at Sun, 14 Feb 2010 10:16:59 +0100
Class file structure
 0123456789abcdef
0cafebabe00000032002207000201001e
10636f6d2f6d6f62696c65666973682f74
206573742f48656c6c6f576f726c640700
30040100106a6176612f6c616e672f4f62
406a6563740100063c696e69743e010003
50282956010004436f64650a000300090c
600005000601000f4c696e654e756d6265
70725461626c650100124c6f63616c5661
80726961626c655461626c650100047468
9069730100204c636f6d2f6d6f62696c65
a0666973682f746573742f48656c6c6f57
b06f726c643b0100046d61696e01001628
c05b4c6a6176612f6c616e672f53747269
d06e673b29560900110013070012010010
e06a6176612f6c616e672f53797374656d
f00c001400150100036f75740100154c6a
1006176612f696f2f5072696e7453747265
110616d3b08001701002748656c6c6f2077
1206f726c642c2077656c636f6d6520746f
130204d6f62696c65666973682e636f6d2e
1400a0019001b07001a0100136a6176612f
150696f2f5072696e7453747265616d0c00
1601c001d0100077072696e746c6e010015
170284c6a6176612f6c616e672f53747269
1806e673b2956010004617267730100135b
1904c6a6176612f6c616e672f537472696e
1a0673b01000a536f7572636546696c6501
1b0000f48656c6c6f576f726c642e6a6176
1c061002100010003000000000002000100
1d0050006000100070000002f0001000100
1e00000052ab70008b100000002000a0000
1f00006000100000003000b0000000c0001
20000000005000c000d00000009000e000f
21000010007000000370002000100000009
220b200101216b60018b100000002000a00
23000000a00020000000500080006000b00
24000000c000100000009001e001f000000
250010020000000020021            
Class file overview
Byte index rangeDescriptionValueRemark
00-03magic (u4)cafebabeThe magic number is common to all Java class files.
04-05minor version (u2)0Minor and Major versions are version numbers of the compiler that created the class file.
06-07major version (u2)50 Minor and Major versions are version numbers of the compiler that created the class file.
Class file (Major.minor) version = 50.0
The class file is compiled by JVM 1.6 (Java SE 6)
and is supported by JVM 1.7 (Java SE 7)

08-09constant pool count (u2)34Constant pool count is the number of entries in the constant pool table.
0a -1c0constant poolSee Constant Pool TableConstant pool is a table of variable length entries defined by a leading tag byte followed by data. The constant pool holds Strings, numeric values, class references, method references, and so on.
1c1-1c2access flags (u2)public Access flags are modifiers used for the class or interface (such as public, final, and the like).
1c3-1c4this class (u2)com.mobilefish.test.HelloWorldThis class is an index into the constant pool (pointing to type CONSTANT_Class), which represents the class or interface defined by this class file.
1c5-1c6super class (u2)java.lang.ObjectSuper class is an index into the constant pool (pointing to type CONSTANT_Class), which represents the superclass of this class. The only exception is java.lang.Object whose superclass index is 0.
1c7-1c8interfaces count (u2)0Interface count is the number of entries in the interface table.
 interfaces infoNot available 
1c9-1cafields count (u2)0Field count is the number of entries in the field table.
 fields infoNot available 
1cb-1ccmethods count (u2)2Method count is the number of entries in the method table.
1cd-24emethods infoSee Methods, Methods attributes and Code atributes table belowMethod info is an array of variable-length entries representing each method defined (not inherited) by this class.
24f-250attributes count (u2)1Attribute count is the number of entries in the attribute table.
251-258attributes infoSee Class attributes table belowAttribute info is an array of variable-length entries representing each attribute of this class. Attributes give additional information about the class, such as the source file.
Constant Pool Table
CP IndexByte index rangeTag (u1)Constant TypeValue (*1)Ref1 (*2)Ref2 (*3)Class or StringNameType
0The constant pool index always start with index 0 but the entry is not included in the class file
1a-c7Class Ref 2 com.mobilefish.test.HelloWorld  
2d-2d1UTF8com/mobilefish/test/HelloWorld     
32e-307Class Ref 4 java.lang.Object  
431-431UTF8java/lang/Object     
544-4c1UTF8<init>     
64d-521UTF8()V     
753-591UTF8Code     
85a-5e10Method Ref 39java.lang.Object<init>()V
95f-6312Name and Type 56 <init>()V
1064-751UTF8LineNumberTable     
1176-8a1UTF8LocalVariableTable     
128b-911UTF8this     
1392-b41UTF8Lcom/mobilefish/test/HelloWorld;     
14b5-bb1UTF8main     
15bc-d41UTF8([Ljava/lang/String;)V     
16d5-d99Field Ref 1719java.lang.SystemoutLjava.io.PrintStream;
17da-dc7Class Ref 18 java.lang.System  
18dd-ef1UTF8java/lang/System     
19f0-f412Name and Type 2021 outLjava.io.PrintStream;
20f5-fa1UTF8out     
21fb-1121UTF8Ljava/io/PrintStream;     
22113-1158String Ref 23 Hello world, welcome to Mobilefish.com.  
23116-13f1UTF8Hello world, welcome to Mobilefish.com.     
24140-14410Method Ref 2527java.io.PrintStreamprintln(Ljava.lang.String;)V
25145-1477Class Ref 26 java.io.PrintStream  
26148-15d1UTF8java/io/PrintStream     
2715e-16212Name and Type 2829 println(Ljava.lang.String;)V
28163-16c1UTF8println     
2916d-1841UTF8(Ljava/lang/String;)V     
30185-18b1UTF8args     
3118c-1a11UTF8[Ljava/lang/String;     
321a2-1ae1UTF8SourceFile     
331af-1c01UTF8HelloWorld.java     
(*1)
If Constant type is UTF8, the value consist of a variable number of bytes (uN).
The number of bytes is determined by the 2 bytes (u2) following the tag byte (u1).
If Constant type is Integer, the value consist of a 4 bytes (u4).
If Constant type is Float, the value consist of a 4 bytes (u4).
If Constant type is Long, the value consist of a 8 bytes (u8).
If Constant type is Double, the value consist of a 8 bytes (u8).

(*2)
If Constant type is Class Ref, a reference to UTF8 is found in Ref1 (u2).
If Constant type is String Ref, a reference to UTF8 is found in Ref1 (u2).
If Constant type is Field Ref, a reference to Class Ref is found in Ref1 (u2).
If Constant type is Method Ref, a reference to Class Ref is found in Ref1 (u2).
If Constant type is Interface Method Ref, a reference to Class Ref is found in Ref1 (u2).
If Constant type is Name and Type, a reference to UTF8 is found in Ref1 (u2).

(*3)
If Constant type is Field Ref, a reference to Name and Type is found in Ref2 (u2).
If Constant type is Method Ref, a reference to Name and Type is found in Ref2 (u2).
If Constant type is Interface Method Ref, a reference to Name and Type is found in Ref2 (u2).
If Constant type is Name and Type, a reference to UTF8 is found in Ref2 (u2).
Interfaces
Not available
Fields
Not available
Field attributes
Not available
Methods
IndexByte index rangeAccess Flag (u2)Name (u2)Descriptor (u2)Attributes count (u2)
01cd-1d4public <init>()V1
120a-211public static main([Ljava/lang/String;)V1
Method attributes
IndexRef to Methods indexByte index rangeName (u2)Attribute length (u4)
001d5-1daCode47
11212-217Code55
Code attributes
IndexRef to Method attributes indexByte index rangemax stack (u2)

(maximum size of the operand stack)
max locals (u2)

(maximum number of local variables allocated for this method)
code length (u4)code array (*1)exception table length (u2)exception array (*2)attributes count (u2)
001db-1eb1152a
b7
00
08
b1
02
11218-22c219b2
00
10
12
16
b6
00
18
b1
02
(*1)
The code length determines the number of records in the code array.
Each code array record is 1 byte in size.

(*2)
The exception table length determines the number of records in the exception array.
Each record in the exception array contains the following values:
start_pc (u2)
end_pc (u2)
handler_pc (u2)
catch_type_index (u2)
LineNumber table
#Ref to Code attributes indexByte index rangeline number table length (u2)start pc (u2)linenumber (u2)
001f2-1f710
3
11233-23c20
8
5
6
The table will only be displayed if you compile with the following options:
javac -g:lines <source files> or javac -g <source files>
LocalVariable table
#Ref to Code attributes indexByte index rangelocalvariable table length (u2)start pc (u2)length (u2)name index (u2)descriptor index (u2)index (u2)name (*1)descriptor (*2)
001fe-20910
5
12
13
0
this
Lcom/mobilefish/test/HelloWorld;
11243-24e10
9
30
31
0
args
[Ljava/lang/String;
(*1)
The value is retrieved from the Constant Pool Table based on the name index value.

(*2)
The value is retrieved from the Constant Pool Table based on the descriptor index value.

The table will only be displayed if you compile with the following options:
javac -g:vars <source files> or javac -g <source files>
Class attributes
#Byte index rangeName (u2)Attribute length (u2)Value (*1)
0251-258SourceFile2value (u2)=HelloWorld.java
 
Close window