Search code examples
eclipsemavenjogl

Maven project: Can't use external jar in Eclispe (UnsatisfiedLinkError)


I am trying to use the external jars JOGL and GlueGen in a Maven poject. When running the code in Eclipse, i get this error message:

error message

I am including both external jars as dependencies in the 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>

Strangely, other other extrenal jars like Guava that are included as dependencies loaded from Maven's central repo work fine.

Help to fix this problem is highly appreciated.


Solution

  • You should use the artifact id gluegen-rt-main instead of gluegen-rt like me: Maven build file of JogAmp's Ardor3D Continuation

    If it's not enough, you'll have to stop using Maven and maybe to disable automated native library loading (this is explained in the JOGL user's guide).