You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am a junior programmer working on a personal project that requires me accessing a webcam in a java file. I found sarxos's webcam-capture and have downloaded it into my project folder. When I run my main class:
import com.github.sarxos.webcam.Webcam;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import com.github.sarxos.webcam.WebcamExceptionHandler;
import com.github.sarxos.webcam.WebcamException;
public class Main {
public static void main(String[] args) throws IOException{
System.out.println("Start Pictures");
Webcam webcam = Webcam.getDefault();
if (webcam != null) {
System.out.println("Webcam: " + webcam.getName());
} else {
System.out.println("No webcam detected");
}
}
}
It gives me an error:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method getDefault() from the type Webcam refers to the missing type WebcamException
at Main.main(Main.java:28)
I am a junior programmer working on a personal project that requires me accessing a webcam in a java file. I found sarxos's webcam-capture and have downloaded it into my project folder. When I run my main class:
}
It gives me an error:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
I have tried running their example class that does the same thing and comes with the library:
https://github.com/sarxos/webcam-capture/blob/master/webcam-capture/src/example/java/DetectWebcamExample.java
but it throws the same error
I have tried everything I can think of. If anyone else has run into this issue how did you solve it.
The text was updated successfully, but these errors were encountered: