An unintended interaction

David Holmes david.holmes at oracle.com
Tue Oct 29 17:22:34 PDT 2013


On 30/10/2013 10:00 AM, Brian Goetz wrote:
> If you have:
>
>    public interface Foo {
>      public static void main(String[] args) {
>        System.out.println("Foo!");
>      }
>    }
>
> you can say
>    java Foo
>
> and it will run.  Is that what we intended?  Should the java launcher
> detect this and not look for main() methods in interfaces?

Seems harmless to me but probably implies a need to update documentation 
in a number of places.

David



More information about the lambda-spec-experts mailing list