This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: Fix for PR 2369
- From: Tom Tromey <tromey at redhat dot com>
- To: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: 25 Nov 2001 18:58:59 -0700
- Subject: Re: Patch: Fix for PR 2369
- References: <87r8qm8vaj.fsf@creche.redhat.com> <3C018B8F.2020108@waitaki.otago.ac.nz>
- Reply-to: tromey at redhat dot com
>>>>> "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