• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java Unable to load the library libvlc

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an aplication in java wich run videos by jvlc. The application run perfectly on ubuntu, but on windows xp or Windows 7 he give me this error:
java.lang.UnsatisfiedLinkError: Unable to load library 'libvlc'.
Somebody can help-me?
Thanks.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

A little googling gave me this http://mailman.videolan.org/pipermail/vlc-devel/2008-April/042277.html
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

You need to make sure that Java can find the native libraries that the program you're trying to run needs. One way to do that is to add the directory that contains the DLLs to the PATH, another way is to use the -Djava.library.path=<directory name> switch on the command line when you run your Java program. For example:

java -Djava.library.path="C:\Program Files\vlc\lib" com.mypackage.MyProgram
 
Fernando Borsatti
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I put the dlls in system32 and i tried the java -Djava.library, but with no sucess. Obs: Also added in my classpath.
Thanks for yours answer
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Putting the DLLs in a directory that is in the classpath will certainly not work; the classpath is only for finding Java classes, not native libraries.

Note that it should be -Djava.library.path, not -Djava.library as you wrote.

Which DLLs do you have? The specific error message says that it is looking for a DLL named libvlc.dll.
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Too difficult a question for "beginning". Moving thread.
 
Fernando Borsatti
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesper de Jong wrote:Putting the DLLs in a directory that is in the classpath will certainly not work; the classpath is only for finding Java classes, not native libraries.

Note that it should be -Djava.library.path, not -Djava.library as you wrote.

Which DLLs do you have? The specific error message says that it is looking for a DLL named libvlc.dll.



I wrote -Djava.library[b].path in the variavel and the dll wich i put in system32 is the libvlc.dll
 
Fernando Borsatti
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
somebody else?
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it still not working? That's strange. Are you absolutely sure that the DLL is in the right directory? For example, you entered:

java -Djava.library.path=C:\myproject org.mypackage.MyProgram

and you have a library called libvlc.dll in directory C:\myproject? Does that DLL try to load other DLLs that you also need to have in the PATH somewhere? Are you sure that the DLL works for your version of Windows (it might be, for example, that the DLL you have is 64-bit while you have 32-bit Windows, or 32-bit Java on 64-bit Windows).
 
Fernando Borsatti
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now he give me another error, something like that: " Problematic frame c libvlcore" and kill the aplication
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That sounds like an error that is specific to libvlc - you'd better ask that on the VideoLAN forums.
 
reply
    Bookmark Topic Watch Topic
  • New Topic