-1

I get this message in the console when trying to run a basic program.

Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/edge/EdgeDriver

In the picture it clearly shows that i have the class available in my referenced libraries but it is not being picked up during execution.

Picture of Eclipse window

Steven S
  • 33
  • 3
  • Do you have a `module-info.java` file and if yes, does deleting it fix it? – howlger Mar 03 '22 at 19:28
  • Did you try the solutions in [this case](https://stackoverflow.com/questions/47823506/exception-in-thread-main-java-lang-noclassdeffounderror-org-openqa-selenium-w#answer-65381262), this might help you. – Xudong Peng Mar 04 '22 at 10:21

1 Answers1

0

Well, I did some test and reproduced the problem. Something like this.

The cause of the problem might be this: You added the jar packages to the modulepath instead of the classpath. Just adding them to the classpath fixes this issue:

enter image description here

Xudong Peng
  • 1,463
  • 1
  • 4
  • 9