0

I was using Eclipse with java 7th version.

But recently, I have installed java 8th version. In cmd prompt, programs are working but not in eclipse. I have changed installed jre path in

windows->preferences->java->installed JRE's

This is the error I am getting:

Error: Could not find or load main class

Lucas
  • 3,181
  • 4
  • 26
  • 45
Madhavi Talla
  • 205
  • 2
  • 5
  • 12

1 Answers1

0

Make sure your main method is:

public static void main(String [] args){

}

In Eclipse, the error you had appears when you don't configure the launch method and you don't write down the String [] args part.

Hope it helps.

Clemencio Morales Lucas.