-1

I just added some code to a project and suddenly I get these errors. The class in question does have a main method and the other class ClientLauncher in the client package exists. I checked and the classes have the correct package listed in them. Any suggestions on what I should check? Thanks.

Error: Could not find or load main class client.ClientLauncher

selection does not contain a main type

user3064141
  • 407
  • 4
  • 17
  • 4
    Please show the exact method declaration. – Jon Skeet Dec 06 '14 at 20:55
  • possible duplicate of [Error: Could not find or load main class](http://stackoverflow.com/questions/7485670/error-could-not-find-or-load-main-class) (or one of the other [linked questions](http://stackoverflow.com/questions/linked/7485670?lq=1)). –  Dec 06 '14 at 21:01
  • I found something that might help you: http://stackoverflow.com/questions/18093928/what-does-could-not-find-or-load-main-class-mean – Neniel Dec 06 '14 at 22:20

1 Answers1

0

I'm not sure if this is what was going on, because I had deleted the last project and started over. But I just got a similar error and thought I'd post this in case it helps someone. In the process of doing a similar project, I forgot to include "String args[]" in the main method definition and only had" public static void main(). This gave a similar "does not have main method". The moment I added the above and had: public static void main(Strings args[]); then the error went away and the code ran correctly.

user3064141
  • 407
  • 4
  • 17