Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8075167

5.2: Clarify that the "initial class" may be an interface

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 9
    • Component/s: specification
    • Labels:
    • Subcomponent:
      vm

      Description

      5.5 says that a class or interface C is initialized under this condition: "If C is a class, its designation as the initial class at Java Virtual Machine startup (§5.2)." In fact, it is right to allow an interface to be designated at JVM startup, provided the interface has a suitable public static method. 5.5 should say "Its designation as the initial class or interface at Java Virtual Machine startup (§5.2)."

      5.2 should say "The Java Virtual Machine starts up by creating an initial class or interface C using the bootstrap class loader (§5.3.1). The Java Virtual Machine then links the initial class or interface, initializes it, and invokes the public class method void main(String[]). ... The initial class or interface is specified in an implementation-dependent manner. In an implementation ..."

      JLS 12.1 should be modified appropriately. Happily, the term "initial class" does not appear outside JLS 12.1, JVMS 5.2, or JVMS 5.5.

        Attachments

          Activity

            People

            • Assignee:
              abuckley Alex Buckley
              Reporter:
              abuckley Alex Buckley
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: