[Bug java/2370] Behavior of main compilation without --main is unfriendly

fitzsim at redhat dot com gcc-bugzilla@gcc.gnu.org
Fri Oct 1 16:28:00 GMT 2004


------- Additional Comments From fitzsim at redhat dot com  2004-10-01 16:27 -------
I would like this to be even more friendly.  Ideally,

gcj X.java

would generate --main automatically, as mentioned, and

gcj *.java

would generate --main if there was only one main method in the source files or
fail with a message listing the possible main methods if there were more than one.

I don't know enough about the front-end yet to know how to do this, but ideally
this is how it should work.  I suppose the driver would have to be able to
search source files (and probably .class files too) for main methods, so that it
would be able to offer a list of possibilities.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fitzsim at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2370



More information about the Java-prs mailing list