0

Hi I am a beginning java learner, and need to run my code in Eclipse. However I encountered below error:

objc[4852]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined. Error: Could not find or load main class

It looks like there are two path ways and Eclipse couldn't read the code/recognize the class.

Teo
  • 3,143
  • 2
  • 29
  • 59

1 Answers1

-1

"Error: Could not find or load main class" This error usually means you don't have a main method on the Class your are trying to run.

I have personally had issues with having installed JREs twice. Remove the non-eclipse one and the problem may disappear.