I am trying to create a Java Applet that runs the client’s webcam and take a picture with a button but I just couldn’t find a way to run the webcam in an applet. Does anyone out there know a simple way to achieve this?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The first problem is that the Applet needs the hardware permission. Applets have a SecurityManager which reads policy-files from the Java-Installation. As standart the is no permission to read from external devices like WebCams or the filesystem.
For you problem I think, you should use the Applet as loader of a JFrame or something else, which runs the Application.
For the webcam you can use OpenCV, which is also avaiable for C++, Android and .NET.
Hope it helped you 😉