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,

Re: Java Command prompt Error - java.lang.NoSuchMethodError: main 80 80

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

Re: Java Command prompt Error - java.lang.NoSuchMethodError: main 80 80

Thanks for your help

Re: Java Command prompt Error - java.lang.NoSuchMethodError: main 80 80

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

Yes. No.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.