Open alilopez7 opened 5 years ago
Hi @alilopez7,
Just to clarify things. This:
[JavaFX Application Thread] INFO com.github.sarxos.webcam.Webcam - WebcamDefaultDriver capture driver will be used
Is not the error. Errors has ERROR
level instead of INFO
. If your application is stopped then the reason is different from the one you pointed.
But something is not right in your example. You wrote that this is the code you are trying to run:
import com.github.sarxos.webcam.Webcam;
public class Testcamera {
public static void main(String[] args) {
Webcam webcam = Webcam.getDefault();
if (webcam != null) {
System.out.println("Webcam: " + webcam.getName());
} else {
System.out.println("No webcam detected");
}
}
And this code is obviously not a JavaFX application. But in the log you provided I clearly see that it comes from JavaFX application (only JavaFX applications are running on JavaFX application thread):
[JavaFX Application Thread] INFO com.github.s ...
Check your environment to investigate what is happening on your side. This may be a silly issue, e.g. are you sure you are running your code correctly? That is, as a Java application and not as a JavaFX application?
i'm wanna try this code
output run :
My problem is that when I execute the application, the error above is generated and the the application stops.
I am using the following files: bridj-0.7.0.jar slf4j-api-1.7.26.jar slf4j-simple-1.7.26.jar webcam-capture-0.3.13-20180618.102645-4.jar
and the operative system MAC OS MOJAVE version 10.14.5 and the IDE eclipse Version: Photon Release (4.8.0) so I wonder how could I resolve this problem? I would appreciate so much your help.