C
C
crescent2018-03-16 14:04:08
Java
crescent, 2018-03-16 14:04:08

Vlcj on Mac not loaded?

You need to connect to libal vlc
on Windows, this is easily done like this:

NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), "C:\\Program Files\\VideoLAN\\VLC");
            Native.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);
            LibC.INSTANCE._putenv("VLC_PLUGIN_PATH="+"C:\\Program Files\\VideoLAN\\VLC\\plugins");

Similar code does not work on mac
NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), "/Applications/VLC.app/Contents/MacOS/lib");
        Native.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);

Mistake:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'vlc': Native library (darwin/libvlc.dylib) not found in resource path ([file:/Library/Java/JavaVirtualMachines/jdk1.8.0_131. jdk/Contents/Home/jre/lib/charsets.jar,

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question