0

I have a problem with this java code doesn't execute :

 Exception in thread "main" java.lang.UnsatisfiedLinkError: 
 Unable to load library    'libvlc': The specified module could not be found.

at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:127)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:170)
at com.sun.jna.Library$Handler.<init>(Library.java:123)
at com.sun.jna.Native.loadLibrary(Native.java:260)
at com.sun.jna.Native.loadLibrary(Native.java:246)
at org.videolan.jvlc.internal.LibVlc.<clinit>(LibVlc.java:41)
at org.videolan.jvlc.JVLC.<init>(JVLC.java:45)
at net.jvlc.NewJFrame.<init>(NewJFrame.java:34)
at net.jvlc.Example.main(Example.java:10)
star
  • 164
  • 1
  • 2
  • 13
  • It would appear that you don't have the `libvlc` in a location that the JVLC API can find. Can you point us to the actually VLC library you are using – MadProgrammer May 29 '14 at 08:26
  • I'm using jna.jar and jvlc-core.jar and here is snippet String[] arg = new String[4]; arg[0] = "--intf=dummy"; arg[1] = "--ignore-config"; arg[2] = "--no-plugins-cache"; arg[3] = "--plugin-path=plugins"; this.jvlc = new JVLC(arg); – star May 29 '14 at 08:34
  • Yes, but "which" bindings are you using, I can find at least 3 distinct ones and may a couple more desides... – MadProgrammer May 29 '14 at 08:38
  • jna.jar Name: com/sun/jna/ Implementation-Title: com.sun.jna Implementation-Vendor: JNA Development Team Implementation-Version: 3.0.6 b2 – star May 29 '14 at 08:41
  • jvlc-cor.jar Manifest-Version: 1.0 Ant-Version: Apache Ant 1.8.1 Created-By: 1.6.0_21-b06 (Sun Microsystems Inc.) – star May 29 '14 at 08:42
  • Unless you can provide a website to the authors and/or document, there's very little anybody can do... – MadProgrammer May 29 '14 at 08:44
  • The only information I can find is from the [videolan wiki page on Java Bindings](https://wiki.videolan.org/Java_bindings/) *"At the moment the JVLC project is dead, as there is no maintainer for it. If you want information on it, see the wiki history"* – MadProgrammer May 29 '14 at 08:45
  • That error is likely independent of the bindings used, it is a well documented problem about how to configure your environment correctly for JNA. There are multiple solutions, perhaps the simplest of them is to use NativeLibrary.addSearchPath("libvlc", "directory_that_contains_libvlc.dll"), or NativeLibrary.addSearchPath("vlc", "directory_that_contains_libvlc.so") to the start of your application. – caprica May 30 '14 at 08:00

0 Answers0