See The JavaTM Virtual Machine Specification, 4.1 ClassFile.

A class file contains a single ClassFile structure:

    ClassFile {
        u2 minor_version;
        u2 major_version;

The items in the ClassFile structure are as follows:

       minor_version, major_version

       The values of the minor_version and major_version items are the minor and major version numbers of the compiler that produced this class file. An
       implementation of the Java Virtual Machine normally supports class files having a given major version number and minor version numbers 0 through
       some particular minor_version.

       If an implementation of the Java Virtual Machine supports some range of minor version numbers and a class file of the same major version but a higher
       minor version is encountered, the Java Virtual Machine must not attempt to run the newer code. However, unless the major version number differs, it will
       be feasible to implement a new Java Virtual Machine that can run code of minor versions up to and including that of the newer code.

       A Java Virtual Machine must not attempt to run code with a different major version. A change of the major version number indicates a major
       incompatible change, one that requires a fundamentally different Java Virtual Machine.

       In Sun's Java Developer's Kit (JDK) 1.0.2 release, documented by this book, the value of major_version is 45. The value of minor_version is 3. Only
       Sun may define the meaning of new class file version numbers.

Posted by '김용환'

댓글을 달아 주세요