如何安装/配置Xuggle以获取UnsatisfiedLinkError? [英] How do I have to install/configure Xuggle to not get an UnsatisfiedLinkError?

查看:177
本文介绍了如何安装/配置Xuggle以获取UnsatisfiedLinkError?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用Xuggle并将所有内容下载到Eclipse中,并将其包含在Referenced Libraries中,但我做了一个非常简单的测试,

I am JUST getting started with Xuggle and I downloaded everything into Eclipse and I included them in them in the Referenced Libraries but I made a really simple test,

package com.xuggle.xuggler.demos;
import com.xuggle.xuggler.IContainer;

public class getContainerInfo {
public static void main (String [] args){

     IContainer myContainer = IContainer.make();
    }
}

它会引发一堆错误,

2011-06-12 16:26:52,142 [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:1734)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1028)
    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.xuggler.demos.getContainerInfo.main(getContainerInfo.java:9)


推荐答案

以下是我发现的内容。有一些混乱,因为从Xuggler 5.2及更高版本开始,你不需要安装它并设置环境变量。

Below is what I've found. There is confusion because as of Xuggler 5.2 and greater, you don't need to install it and set the environment variables.

当你在网上寻找答案时,你可以通过找到旧版本和新版本的混合步骤来混淆。下面(B)中的步骤不再适用。

When looking at the web for answers, you may be confused by finding a mixture of steps from old and new versions. The steps from (B) below, no longer apply.

我自己最终通过确保jar在J2EE容器lib中并通过升级来解决问题从Xuggler 5.2到5.4。此后,链接错误消失。

(A)这适用于所有版本

来自 Xuggler文档


将Xuggler与J2EE容器一起使用

Xuggler包含本机代码,因此需要使用Tomcat等J2EE容器进行特殊安装,码头或Glassfish。它必须安装在J2EE容器加载它的位置,而不是特定的Web应用程序(除非您可以保证您的应用程序是服务器中唯一将加载Xuggler的应用程序)。您必须查找特定容器的特定文档,但作为示例,对于Tomcat,请确保将xuggle-xuggler.jar文件安装到$ CATALINA_HOME / shared / lib。有关原因,请参阅tomcat JNI备注。

Using Xuggler with J2EE Containers
Xuggler contains Native Code and therefore requires special installation with J2EE containers such as Tomcat, Jetty or Glassfish. It must be installed in a location where the J2EE container loads it, rather than a specific web application (unless you can guarantee that your application is the only application in the server that will load Xuggler). You will have to look up the specific documentation for your specific container, but as an example, for Tomcat make sure you install xuggle-xuggler.jar file to $CATALINA_HOME/shared/lib. See tomcat JNI notes for the reason why.






(B)THIS仅适用于XUGGLER PRE 5.2

来自: Xuggler Faq


java.lang.UnsatisfiedLinkError有什么用?

意思是Java无法找到Xuggler本机库。检查以下内容:

您是否安装了Xuggler?

如果没有,请按照此处的说明进行操作


  • 是否已定义环境变量XUGGLE_HOME且指向你的Xuggler安装目录(通常是Windows上的C:\Program Files \ Xuggle或Linux / Mac上的/ usr / local)?

  • 如果你在Windows上安装,你是否重新启动你安装好之后?
    您的PATH环境变量是否包含Windows上的%XUGGLE_HOME%\ bin或Linux / Mac上的$ XUGGLE_HOME / bin?

  • 您的PATH环境变量是否包含%XUGGLE_HOME%\ Windows上的lib?

  • 您的LD_LIBRARY_PATH环境变量是否包含Linux上的$ XUGGLE_HOME / lib?

  • 您的DYLD_LIBRARY_PATH环境变量是否包含Mac上的$ XUGGLE_HOME / lib OS-X?

  • 您使用的是32位Java JVM,还是64位版本的Xuggler?或者是64位版本的Java JVM,还是32位版本的Xuggler?不幸的是,这不会奏效。您需要确保匹配每个版本的位数。抱歉。
    如果解决这些问题无法解决问题,请通过支持选项与我们联系。

  • Is the environment variable XUGGLE_HOME defined and pointing to your Xuggler install directory (usually C:\Program Files\Xuggle on Windows or /usr/local on Linux/Mac)?
  • If you installed on Windows, did you reboot after you installed? Does your PATH environment variable include %XUGGLE_HOME%\bin on Windows or $XUGGLE_HOME/bin on Linux/Mac?
  • Does your PATH environment variable include %XUGGLE_HOME%\lib on Windows?
  • Does your LD_LIBRARY_PATH environment variable include $XUGGLE_HOME/lib on Linux?
  • Does your DYLD_LIBRARY_PATH environmentvariable include $XUGGLE_HOME/lib on Mac OS-X?
  • Are you using a 32-bit Java JVM, but a 64-bit version of Xuggler? Or a 64-bit version of the Java JVM but a 32-bit version of Xuggler? Unfortunately that won't work. You need to make sure that you match the "bitness" of each release. Sorry. If fixing those problems doesn't resolve the issue, please contact us via the Support options.

这篇关于如何安装/配置Xuggle以获取UnsatisfiedLinkError?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆