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

Clarify if public static main method is allowed in anonymous/local class

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P3
    • None
    • None
    • tools

    Description

      JDK-8261785 raised the question if such method should be allowed in launcher.

      The static method is allowed in local and anonymous class by JEP-395, so that it's possible to define 'main' method and launched with `java` command as long as user can specify the class.

      Attachments

        Activity

          People

            Unassigned Unassigned
            henryjen Henry Jen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: