java.lang.RuntimeException

Failed to load the native library. The error was "Unable to load library 'vlc': JNA native support (darwin/libvlc.jnilib) not found in resource path (~/projects/Lince/build/classes/main:~/projects/Lince/build/resources/main:~/.gradle/caches/modules-2/files-2.1/uk.co.caprica/vlcj/2.4.1/57a33ac153f2116d9c3099fc9a3efc8226ae00bc/vlcj-2.4.1.jar:~/.gradle/caches/modules-2/files-2.1/org.jdesktop/beansbinding/1.2.1/5a34143743fc23e24b27e7cb7042ff0fb710a69b/beansbinding-1.2.1.jar:~/.gradle/caches/modules-2/files-2.1/com.healthmarketscience.jackcess/jackcess/1.2.13/1e36ef61f70f3dce01e4e146c3cabd3d1c22f5ff/jackcess-1.2.13.jar:~/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/3.5.2/f1bf9fe267e17c1a8f7d1aa2c985e7fe81a06da6/jna-3.5.2.jar:~/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/platform/3.5.2/beac07d13858ef3697ceeab43897d70aeb5113c9/platform-3.5.2.jar:~/.gradle/caches/modules-2/files-2.1/commons-lang/commons-lang/2.0/b2921b7862e7b26b43aa239c2c20cc16431a8ffd/commons-lang-2.0.jar:~/.gradle/caches/modules-2/files-2.1/commons-logging/commons-logging/1.0.3/760c711c71588bc273d3e56d196d720a7678cd93/commons-logging-1.0.3.jar)". The required native libraries are named "libvlc.dylib" and "libvlccore.dylib". In the text below <libvlc-path> represents the name of the directory containing "libvlc.dylib" and "libvlccore.dylib"... There are a number of different ways to specify where to find the native libraries: 1. Include NativeLibrary.addSearchPath("vlc", "<libvlc-path>"); at the start of your application code. 2. Include System.setProperty("jna.library.path", "<libvlc-path>"); at the start of your application code. 3. Specify -Djna.library.path=<libvlc-path> on the command-line when starting your application. 4. Add <libvlc-path> to the system search path (and reboot). If this still does not work, then it may be necessary to explicitly add the native library directory to the operating system configuration - e.g. on Linux this might mean setting the LD_LIBRARY_PATH environment variable, or adding configuration to the "/etc/ld.so.conf" file or the "/etc/ld.so.conf.d" directory. Of these options, setting LD_LIBRARY_PATH is the only one that would not require root privileges. Finally, it is not possible to mix CPU architectures - it is not possible for a 64-bit Java Virtual Machine to load 32-bit native libraries. More information may be available in the log, specify -Dvlcj.log=DEBUG on the command-line when starting your application.

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web73724

  • via GitHub by BraisGabin
    , 10 months ago
    architectures - it is not possible for a 64-bit Java Virtual Machine to load 32-bit native libraries. More information may be available in the log, specify -Dvlcj.log=DEBUG on the command-line when starting your application.
  • via GitHub by Markus1397
    , 1 year ago
    adding configuration to the "/etc/ld.so.conf" file or the "/etc/ld.so.conf.d" directory. Of these options, setting LD_LIBRARY_PATH is the only one that would not require root privileges. Finally, it is not possible to mix CPU architectures - it is not possible for a 64-bit Java Virtual Machine to load 32-bit native libraries. More information may be available in the log.
  • " file or the "/etc/ld.so.conf.d" directory. Of these options, setting LD_LIBRARY_PATH is the only one that would not require root privileges. Finally, it is not possible to mix CPU architectures - it is not possible for a 64-bit Java Virtual Machine to
  • Stack trace

    • java.lang.RuntimeException: Failed to load the native library. The error was "Unable to load library 'vlc': JNA native support (darwin/libvlc.jnilib) not found in resource path (~/projects/Lince/build/classes/main:~/projects/Lince/build/resources/main:~/.gradle/caches/modules-2/files-2.1/uk.co.caprica/vlcj/2.4.1/57a33ac153f2116d9c3099fc9a3efc8226ae00bc/vlcj-2.4.1.jar:~/.gradle/caches/modules-2/files-2.1/org.jdesktop/beansbinding/1.2.1/5a34143743fc23e24b27e7cb7042ff0fb710a69b/beansbinding-1.2.1.jar:~/.gradle/caches/modules-2/files-2.1/com.healthmarketscience.jackcess/jackcess/1.2.13/1e36ef61f70f3dce01e4e146c3cabd3d1c22f5ff/jackcess-1.2.13.jar:~/.gradle/caches/modules-2/files-2.1
    • et.java.dev.jna/jna/3.5.2/f1bf9fe267e17c1a8f7d1aa2c985e7fe81a06da6/jna-3.5.2.jar:~/.gradle/caches/modules-2/files-2.1
    • et.java.dev.jna/platform/3.5.2/beac07d13858ef3697ceeab43897d70aeb5113c9/platform-3.5.2.jar:~/.gradle/caches/modules-2/files-2.1/commons-lang/commons-lang/2.0/b2921b7862e7b26b43aa239c2c20cc16431a8ffd/commons-lang-2.0.jar:~/.gradle/caches/modules-2/files-2.1/commons-logging/commons-logging/1.0.3/760c711c71588bc273d3e56d196d720a7678cd93/commons-logging-1.0.3.jar)". The required native libraries are named "libvlc.dylib" and "libvlccore.dylib". In the text below <libvlc-path> represents the name of the directory containing "libvlc.dylib" and "libvlccore.dylib"... There are a number of different ways to specify where to find the native libraries: 1. Include NativeLibrary.addSearchPath("vlc", "<libvlc-path>"); at the start of your application code. 2. Include System.setProperty("jna.library.path", "<libvlc-path>"); at the start of your application code. 3. Specify -Djna.library.path=<libvlc-path> on the command-line when starting your application. 4. Add <libvlc-path> to the system search path (and reboot). If this still does not work, then it may be necessary to explicitly add the native library directory to the operating system configuration - e.g. on Linux this might mean setting the LD_LIBRARY_PATH environment variable, or adding configuration to the "/etc/ld.so.conf" file or the "/etc/ld.so.conf.d" directory. Of these options, setting LD_LIBRARY_PATH is the only one that would not require root privileges. Finally, it is not possible to mix CPU architectures - it is not possible for a 64-bit Java Virtual Machine to load 32-bit native libraries. More information may be available in the log, specify -Dvlcj.log=DEBUG on the command-line when starting your application. at uk.co.caprica.vlcj.binding.LibVlcFactory.create(LibVlcFactory.java:191) at uk.co.caprica.vlcj.player.MediaPlayerFactory.<init>(MediaPlayerFactory.java:213) at lince.reproductor.Reproductor.initMediaPlayer(Reproductor.java:100) at lince.reproductor.Reproductor.initComponents(Reproductor.java:61) at lince.reproductor.Reproductor.<init>(Reproductor.java:50) at lince.LinceFrame.initComponents(LinceFrame.java:69) at lince.LinceFrame.<init>(LinceFrame.java:53) at lince.LinceFrame.getInstance(LinceFrame.java:44) at lince.LinceApp$1.run(LinceApp.java:55) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 2 years ago