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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 21
    • 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

            rpressler Ron Pressler
            lkuskov Leonid Kuskov
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: