|
From: Leif M. <le...@ta...> - 2004-01-06 16:20:05
|
Aiman,
The WrapperSimpleApp and WrapperStartStopApp classes currently only
look for a
static main method in the class specified as the main class. It does
not recurse up and
look at the parent classes looking for a main method. I had not
actually known that
was legal. I'll do some testing here and get this fixed for a future
version.
For now, you can work around this by creating a dummy class whose
main method
simply calls the main method that you want.
Thinking about this as I write however, I am confused as to why you
do not just specify
BlaParent as your main class? The main class is static so there is no
reason to be calling
the main method using the child class name.
As for searching the list, go to the following page:
http://sourceforge.net/mailarchive/forum.php?forum_id=11948
Use the search box in the upper left of the screen. It is a bit
confusing as it is the same
search box as the SF site. But if you look closely you will see the
list box over the field
says "This Mailing List".
Cheers,
Leif
Aiman Younis wrote:
>Hi.
>Just joined the mailing list today (just started using the software last
>week).
>
>I've run into a problem where I get the error:
>jvm 1 | WrapperSimpleApp: Unable to locate a static main method in class
>com.my.class.Bla: java.lang.NoSuchMethodException:
>com.my.class.Bla.main([Ljava.lang.String;)
>
>I looked in the code of Bla (not my code), and there was no main class,
>however Bla extended BlaParent which does have a main class. So when Bla is
>run from the command line, it works.
>
>So does anybody know how to have WrapperSimpleApp launch Bla even though it
>uses BlaParent's main function to start?
>
>And one more (non-related) question. Is there a way to search the mailing
>list archives? I went through all the subjects of the archives on the web
>looking for the word "main" hoping to find this question already asked. I
>didn't find anything though, so I apologize if this is a repeat question.
>
>Thanks,
>Aiman
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: IBM Linux Tutorials.
>Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
>Free Linux Tutorials. Learn everything from the bash shell to sys admin.
>Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
>_______________________________________________
>Wrapper-user mailing list
>Wra...@li...
>https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>
|