要使用 Xuggler,您需要 xuggle-xuggler-5.4.jar
。据做这个的人说,大多数用户只需要上面提到的JAR文件。然而,这就是他们关于使用 Xuggler 没有 Maven 或 Ivy 的说法:
Using Xuggler WITHOUT Apache Maven or Apache Ivy
What are you... stuck in 2003? Anyway, if you insist on this, Xuggler's pre-compiled binaries (including native versions) can be found here. Make sure that xuggle-xuggler.jar and its dependencies are included in your Java classpath. See the xuggle-xugger-*.pom file distributed with the version of Xuggler that you use to find the (small) set of dependent jars, and download them as well.
我下载了最新版本 5.4 的 xuggle-xuggler.jar
文件,但我不理解它的 pom 文件。
下载依赖后更新
我有以下目录结构:
xuggle-xuggler-5.4.jar
存放在E:\xuggle xuggler 依赖项
存储在 E:\xuggle\xuggle-dependencies 问题:
最佳答案
以下文件列出了 xuggle 依赖的其他 jar:
您可以阅读这些内容,然后从适当的存储库中手动检索它们,但我认为开始使用依赖项管理器会更简单。
你问如何下载这些依赖项,ivy有一个方便的command-line操作模式。 (见下面的例子)
Eclipse 集成非常困难……一旦您下载了 jar,您就可以尝试生成“.classpath”文件或通过 Eclipse GUI 手动添加每个 jar。 我不推荐这种方法的原因是因为有适用于 Maven 和 Ivy 的 Eclipse 插件可以自动为您执行此操作。
例子
从命令行运行 ivy,如下所示:
java -jar ivy.jar -settings ivysettings.xml -dependency xuggle xuggle-xuggler 5.4 -retrieve "lib/[artifact]-[revision].[ext]"
它将 xuggle 及其所有依赖项检索到“lib”目录中,如下所示:
├── ivysettings.xml
└── lib
├── commons-cli-1.1.jar
├── logback-classic-1.0.0.jar
├── logback-core-1.0.0.jar
├── slf4j-api-1.6.4.jar
└── xuggle-xuggler-5.4.jar
Ivy 设置.xml
此文件告诉 ivy 从 Maven Central 中检索 jars ,或 Xuggle 项目提供的 Maven 存储库。
<ivysettings>
<settings defaultResolver="repos" />
<resolvers>
<chain name="repos">
<ibiblio name="central" m2compatible="true"/>
<ibiblio name="xuggle" m2compatible="true" root="http://xuggle.googlecode.com/svn/trunk/repo/share/java"/>
</chain>
</resolvers>
</ivysettings>
关于eclipse - Xuggler 初学者设置指南,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14534870/