VVEIRD / StreamDeckCore

Java implementation for the Elgato Stream Deck
MIT License
30 stars 14 forks source link

MacOS: Unable to load library 'CoreFoundation': Native library (darwin/libCoreFoundation.dylib) not found #9

Open leo-from-spb opened 2 years ago

leo-from-spb commented 2 years ago

Attempting to get a StreamDeckDevices instance produces the following exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'CoreFoundation': Native library (darwin/libCoreFoundation.dylib) not found in resource path (...)
    at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:271)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398)
    at com.sun.jna.Library$Handler.<init>(Library.java:147)
    at com.sun.jna.Native.loadLibrary(Native.java:412)
    at com.sun.jna.Native.loadLibrary(Native.java:391)
    at purejavahidapi.macosx.CoreFoundationLibrary.<clinit>(CoreFoundationLibrary.java:41)
    at purejavahidapi.macosx.MacOsXBackend.init(MacOsXBackend.java:116)
    at purejavahidapi.PureJavaHidApi.<clinit>(PureJavaHidApi.java:117)
    at de.rcblum.stream.deck.device.StreamDeckDevices.getStreamDeckInfo(StreamDeckDevices.java:86)
    at de.rcblum.stream.deck.device.StreamDeckDevices.getStreamDeckDevice(StreamDeckDevices.java:100)
    at de.rcblum.stream.deck.device.StreamDeckDevices.getStreamDeck(StreamDeckDevices.java:124)
...

Is there a workaround? Thanks!

wesSull commented 1 year ago

Hi, if you install the purejavahidapi fork that is referenced in the readme this will resolve your issue. You can also do this by adding

io.github.vveird purejavahidapi 0.0.3

to maven