[ajug-members] why? NoSuchMethodError: main
Jeremy Haile
jhaile at fastmail.fm
Thu Aug 9 12:35:06 EDT 2007
Yeah, also - if you want to return a value from your process, you should
do it like so:
public static void main(String[] args) {
int returnValue = new MakeConfigs().doMain(args);
System.exit( returnValue );
}
Good luck,
Jeremy Haile
On Thu, 9 Aug 2007 12:28:42 -0400, "James W. Anderson"
<jwanderson at bellsouth.net> said:
> I think you're missing a couple parentheses on MakeConfigs...
>
> class YourClass
> {
> public static int main(String[] args)
> {
> Return new MakeConfigs().doMain(args);
> }
> }
>
> -----Original Message-----
> From: ajug-members-bounces at ajug.org
> [mailto:ajug-members-bounces at ajug.org]
> On Behalf Of Tim Watts
> Sent: Thursday, August 09, 2007 12:25 PM
> To: ajug-members at ajug.org
> Subject: [ajug-members] why? NoSuchMethodError: main
>
> Hi,
>
> I'm getting this when I run my utilty:
>
> Exception in thread "main" java.lang.NoSuchMethodError: main
>
> The class has:
>
> public static int main(String[] args) {
> return new MakeConfigs.doMain(args);
> }
>
> The class is public:
>
> public class MakeConfigs {...
>
> And it's in the classpath (otherwise I wouldn't even get this error, of
> course).
>
> I tried java -verbose... and it just tells me what jar it found the class
> in.
> I'm running under jdk 1.5, it's compiled for 1.4
>
> Any ideas what could be going on?
> _______________________________________________
> ajug-members mailing list
> ajug-members at ajug.org
> http://www.ajug.org/mailman/listinfo/ajug-members
>
> _______________________________________________
> ajug-members mailing list
> ajug-members at ajug.org
> http://www.ajug.org/mailman/listinfo/ajug-members
More information about the ajug-members
mailing list