This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: Fix for PR 2369


>>>>> "Bryce" == Bryce McKinlay <bryce@waitaki.otago.ac.nz> writes:

Bryce> If we passed the --main option through to jc1, it could verify
Bryce> that it is not only a valid class name but also an actual class
Bryce> that contains a "main" method.

This would be a nice feature.

Bryce> So, maybe the ultimate fix would be to get rid of the jvgenmain
Bryce> stuff, and have jc1 generate the C "main" itself. The driver
Bryce> would pass "-fmain" if a main method is required but was not
Bryce> specified, or -fmain=xxx if the user specified one.

Another thing we can pay attention to is that a jar file can contain
the name of the main class.  It would be nice if gcj could recognize
this automatically.  We have a PR on it.

One idea I had was to have jvgenmain know how to read the jar file and
extract the main class name.  However jvgenmain can't determine
whether the `--main' argument really names a class.  If it could do
this it would need the parser in it.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]