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

5.2: Inappropriate mention of bootstrap class loader for initial class

    Details

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

      Description

      According to the assertion jvms-5.2-100, the initial class which contains the main method should be loaded using the bootstrap class loader. But actually, the initial class loading happen using AppClassLoader. This was tested using the attached Java code.

      Assertion:
      The Java Virtual Machine starts up by creating an initial class or interface 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 static method void main(String[]). The invocation of this method drives all further execution. Execution of the Java Virtual Machine instructions constituting the main method may cause linking (and consequently creation) of additional classes and interfaces, as well as invocation of additional methods. jvms-5.2-100

        Attachments

          Activity

            People

            • Assignee:
              abuckley Alex Buckley
              Reporter:
              sramasamy Sankar Ramasamy (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: