-1
Error: Could not find or load main class

The error appears in all my files in Eclipse.

csse
  • 91
  • 6
  • Could be helpful, but I don't think there's much info in this particular error where main method is not found. – Shanu Gupta Apr 30 '18 at 11:26
  • @ABear there is no stack trace, it's pretty much this: Error: Could not find or load main class – csse Apr 30 '18 at 11:27
  • Fair enough. Can I ask the OP where the arraySize is coming from in the generateRandomArray function? And are you sure its working without the array and loop? As the error doesn't seem to match up with the suggested casue to me... – CodeMonkey123 Apr 30 '18 at 11:28
  • it doesn't, my bad. – csse Apr 30 '18 at 11:37
  • I've tried to clean all my projrcts, but i'm still getting the same error – csse Apr 30 '18 at 12:46

1 Answers1

0

I believe this happens because one or more of your run and/or debug targets are out of date, maybe because you have moved or renamed a class (or the package) with a main method or moved the main method. Go to Run --> Run Configurations... and check what you have set for Main Class:for your application configurations. (and do the same for Debug if necessary)

Joakim Danielson
  • 43,251
  • 5
  • 22
  • 52