0

Hello, I have a code which has public void run() and I have no problems compile the code. When I try to execute the class file I get an error Exception in thread "main" java.lang.NoSuchMethodError: main.

Does the command line execution needs main() ? Is there a way to execute without the main() from the command prompt. Please share your thoughts,

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by JamesCherrill
0

read and understand the Java tutorial and all will become clear (or at least clearer than it is now) to you.

0

Does the command line execution needs main() ? Is there a way to execute without the main() from the command prompt.

Yes. No.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.