本文介绍了java.lang.UnsatisfiedLinkError:no xuggle-xuggler在java.library.path中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Ubuntu 11.04和Eclipse。我成功安装了Xuggler,我已经在他们的FAQ中检查了环境变量和与linux有关的一切:



我还根据他们的教程设置了Eclipse:



每当我尝试运行使用Xuggler的任何代码时,我会收到以下错误:

  2011-09-14 14:17 :30,093 [main] ERROR com.xuggle.ferry.JNILibraryLoader  - 无法加载库:xuggle-xuggler;版本:3;访问http://www.xuggle.com/xuggler/faq/找到这个问题的常见解决方案
线程main中的异常java.lang.UnsatisfiedLinkError:java.library.path中的no xuggle-xuggler
在java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
在java.lang.Runtime.loadLibrary0(Runtime.java:840)
在java.lang.System.loadLibrary(系统.java:1047)
在com.xuggle.ferry.JNILibraryLoader.loadLibrary0(JNILibraryLoader.java:265)
在com.xuggle.ferry.JNILibraryLoader.loadLibrary(JNILibraryLoader.java:168)
)在com.xuggle.xuggler.XugglerJNI。< clinit>(XugglerJNI.java:19)
在com.xuggle.xuggler.IContainer。< clinit>(IContainer.java:1457)
at com.xuggle.mediatool.MediaReader。< init>(MediaReader.java:137)
在com.xuggle.mediatool.ToolFactory.makeReader(ToolFactory.java:77)
在recode.main(重新编码.java:16)

那么,如何解决这个问题?

解决方案

我得到了xuggler-users谷歌组的答案/解决方案,信用于Navin Bhutada:

 在运行netbeans之前包含Xugg变量,如下所示:
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

我使用eclipse,所以我只是改变了最后一行,通过命令行从其文件夹运行eclipse,一切正常。



注意:如果我导出变量,并尝试从桌面上的快捷方式打开eclipse,它不起作用。从命令行运行的相同文件的快捷方式



TLDR:
安装
后导出的变量从终端运行Eclipse。


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?

解决方案

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 installingrun Eclipse from the terminal.

这篇关于java.lang.UnsatisfiedLinkError:no xuggle-xuggler在java.library.path中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 03:16