JVM invokes main methods allowed by JEP 445 despite CFV if --enable-preview

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P3
    • None
    • Affects Version/s: 21
    • Component/s: tools

      According to the JEP https://openjdk.org/jeps/12: since a new JVM behaviour of invoking a main method depends on the the preview features: JEP 445 of Java 21, a class file that denotes this dependence should have the version 65.65535 and only for this version JVM should be able to invoke the variety of main methods stated in JLS 12.1.4 .
      Currently JVM is able to invoke for example
      protected static main()V
      if CFV == 49.0 and --enable-preview

            Assignee:
            Ron Pressler
            Reporter:
            Leonid Kuskov
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: