How to properly import the Webcam sarxos library to Eclipse IDE, Java

Viewed 31

I have a problem that I've been trying to solve for a week and it still does not work. I'm pretty new also. I want to know how I can properly import the Webcam sarxos library in the Eclipse IDE. What I did is what follows:

  1. I downloaded the sarxos library from Github
  2. I extracted the zip package and put all in a folder
  3. In Eclipse I click the project folder made ALT+ENTER and went to « Java Build Path » then I clicked on the « Modulepath » (I also tried Classpath) section and clicked « add external jars »
  4. I then selected the « webcam-capture-0.3.12.jar », the« bridj-0.7.0.jar » and the slf4j-api-1.7.2.jar

After that, it's just applied and closed and Eclipse can effectively recognize the webcam library and he shows that there is no error in the code. Even the auto-completion can find the code of the library. But the weird part is that whenever I run my code, it shows me an error that says:

java.lang.NoClassFoundError: com/github/sarxos/webcam/Webcam

Also, the rest of my code is coded perfectly and has no error but as soon as I write Webcam webcam = Webcam.getDefault(); The error is shown

0 Answers
Related