An unintended interaction
Sam Pullara
spullara at gmail.com
Tue Oct 29 17:40:11 PDT 2013
I kind of like the idea that the interface might choose its application implementation based on the arguments passed on the command line. Sam
---Sent from Boxer
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/lambda-spec-experts/attachments/20131029/7d35fb04/attachment.html
More information about the lambda-spec-experts
mailing list