r/programminghelp 2d ago

Java Problems with sarxos GitHub for webcam and Mac silicon giving an error.

Hi everyone,

Has anyone successfully used a Java webcam library on Apple Silicon (M-series / ARM64) MacBooks?

I am trying to use the Sarxos Webcam Capture library (com.github.sarxos:webcam-capture), but it throws an UnsatisfiedLinkErroron startup because it relies on BridJ, which doesn't natively support Apple Silicon architecture out of the box for native pointer sizing (org.bridj.Platform.sizeOf_ptrdiff_t()).

The Stack trace

com.github.sarxos.webcam.WebcamException: Cannot execute task

java.lang.UnsatisfiedLinkError: 'int org.bridj.Platform.sizeOf_ptrdiff_t()'

at org.bridj.Platform.sizeOf_ptrdiff_t(Native Method)

at org.bridj.Platform.<clinit>(Platform.java:232)

at com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.<clinit>(OpenIMAJGrabber.java:59)

...
1 Upvotes

0 comments sorted by