next up previous contents
Next: <init> Up: The Empty Program Previous: The Empty Program

Initial constant_pool[] Entries

There are several entries in the constant_pool[] that have to be present in every class file. These entries are:

Other entries needed by the above entries, like the CONSTANT_Utf8_info entries containing the names and CONSTANT_NameAndType_info entry needed by the CONSTANT_Methodref_info entry describing <init>, and entries containing the name and descriptor of the main method are of course also present.

Something I did not expect was that javac also put the CONSTANT_Utf8_info entries in the constant_pool[] containing the names of the attributes ( Code, Exceptions, LineNumberTable, LocalVariableTable, SourceFile and ConstantValue), even if they are not used. This of course does not mean they have to be put in there.



mark@bottom.xs4all.nl