Download Jar. Uses 2596K of libraries. Click here for Pure Java version (409L/3K).
1  | !7  | 
2  | |
3  | lib 1008985 // webcam  | 
4  | lib 1008987 // bridj  | 
5  | lib 1004016 // slf4j api  | 
6  | |
7  | import com.github.sarxos.webcam.Webcam;  | 
8  | |
9  | p {
 | 
10  |   print("Finding webcam...");
 | 
11  | Webcam webcam = Webcam.getDefault();  | 
12  | print();  | 
13  | if (webcam != null)  | 
14  |     print("Found webcam! " + webcam.getName());
 | 
15  | else  | 
16  |     print("No webcam detected");
 | 
17  | }  | 
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, wtqryiryparv
No comments. add comment
| Snippet ID: | #1008986 | 
| Snippet name: | Detect Webcam [WORKS for me on Linux] | 
| Eternal ID of this version: | #1008986/6 | 
| Text MD5: | 4996ef0514272de356e79540885f2c04 | 
| Transpilation MD5: | 1a04e42c8df97af9f0204815e7a9eef4 | 
| Author: | stefan | 
| Category: | javax / desktop / camera | 
| Type: | JavaX source code (desktop) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2017-06-22 19:31:35 | 
| Source code size: | 325 bytes / 17 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 862 / 1787 | 
| Version history: | 5 change(s) | 
| Referenced in: | [show references] |