Search code examples
javalinuxeclipsexugglexuggler

java.lang.UnsatisfiedLinkError: no xuggle-xuggler in java.library.path


I'm using Ubuntu 11.04 and Eclipse. I installed Xuggler succesfully, I've checked the environment variables and everything related with linux in their FAQ: http://wiki.xuggle.comFrequently_Asked_Questions#What.27s_up_with_java.lang.UnsatisfiedLinkError.3F

I also set up Eclipse according to their tutorial: http://xuggle.wordpress.com/2009/01/23/how-to-write-your-first-xuggler-application-in-eclipse/

Whenever I try running any code which uses Xuggler I get the following error:

2011-09-14 14:17:30,093 [main] ERROR com.xuggle.ferry.JNILibraryLoader - Could not load library: xuggle-xuggler; version: 3; Visit http://www.xuggle.com/xuggler/faq/ to find common solutions to this problem
Exception in thread "main" java.lang.UnsatisfiedLinkError: no xuggle-xuggler in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
    at java.lang.Runtime.loadLibrary0(Runtime.java:840)
    at java.lang.System.loadLibrary(System.java:1047)
    at com.xuggle.ferry.JNILibraryLoader.loadLibrary0(JNILibraryLoader.java:265)
    at com.xuggle.ferry.JNILibraryLoader.loadLibrary(JNILibraryLoader.java:168)
    at com.xuggle.xuggler.XugglerJNI.<clinit>(XugglerJNI.java:19)
    at com.xuggle.xuggler.IContainer.<clinit>(IContainer.java:1457)
    at com.xuggle.mediatool.MediaReader.<init>(MediaReader.java:137)
    at com.xuggle.mediatool.ToolFactory.makeReader(ToolFactory.java:77)
    at recode.main(recode.java:16)

So, how to solve this?


Solution

  • I got the answer/solution from the xuggler-users google group, credits to Navin Bhutada:

    solve it by including the Xuggle variables before runing the netbeans like this:
    export XUGGLE_HOME=/home/xyzuser/xuggler 
    export PATH=$XUGGLE_HOME/lib:$XUGGLE_HOME/bin:$PATH
    export LD_LIBRARY_PATH=$XUGGLE_HOME/lib:$LD_LIBRARY_PATH
    /usr/share/netbeans/6.9/bin/./netbeans"
    

    I use eclipse, so I just changed that last line, running eclipse from its folder through the command line and everything worked just fine.

    Note: If I export the variables and try opening eclipse from a shortcut on my desktop it doesn't work. The shortcut point to the same file I ran from the command line

    TLDR: export variables you got after installing run Eclipse from the terminal.