Maven项目:无法在Eclispe中使用外部jar(UnsatisfiedLinkError)

时间:2019-06-26 12:35:37

标签: eclipse maven jogl

我试图在Maven项目中使用外部jars JOGL和GlueGen。在Eclipse中运行代码时,出现以下错误消息:

error message

我将两个外部jar都作为依赖项包含在pom.xml中。

<dependencies>
    <!-- JOGL & Gluegen -->
    <dependency>
        <groupId>org.jogamp.gluegen</groupId>
        <artifactId>gluegen-rt</artifactId>
        <version>2.3.2</version>
    </dependency>
    <dependency>
        <groupId>org.jogamp.jogl</groupId>
        <artifactId>jogl-all-main</artifactId>
        <version>2.3.2</version>
    </dependency>
</dependencies>

奇怪的是,其他其他外部容器(如Guava)作为从Maven中央存储库加载的依赖项而包括在内,也可以正常工作。

非常感谢您帮助解决此问题。

1 个答案:

答案 0 :(得分:1)

您应使用工件ID gluegen-rt-main,而不要像我这样使用gluegen-rtMaven build file of JogAmp's Ardor3D Continuation

如果这还不够,您将不得不停止使用Maven,并可能禁用自动本机库加载(this is explained in the JOGL user's guide)。