Login  Register

Error when start jar builded by Maven

Posted by ChazAshley on Apr 13, 2015; 1:28pm
URL: https://forum.jogamp.org/Error-when-start-jar-builded-by-Maven-tp4034280.html

Hello. Got this error when try to start jar file.
/*******************************/
D:\IdeaProjects\Java3D\target>java -jar Java3D-1.0-SNAPSHOT-jar-with-dependencies.jar
Catched FileNotFoundException: D:\IdeaProjects\Java3D\target\Java3D-1.0-SNAPSHOT-jar-with-dependencies-natives-windows-amd64.jar (
The system cannot find the path specified), while TempJarCache.bootstrapNativeLi
b() of jar:file:/D:/IdeaProjects/Java3D/target/Java3D-1.0-SNAPSHOT-jar-with-dependencies-natives-windows-amd64.jar!/ (file:/D:/IdeaProjects/Java3D/target/ + Java3D-1.0-SNAPSHOT-jar-with-dependencies-n
atives-windows-amd64.jar)
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: D:\IdeaProjects\Java3D\target\gluegen-rt.dll
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.load0(Unknown Source)
        at java.lang.System.load(Unknown Source)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:468)
        at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:63)
        at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:94)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:332)
        at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:390)
        at com.jogamp.common.os.Platform$1.run(Platform.java:210)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:173)
        at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:82)
        at GLDebug.StartGL(GLDebug.java:124)
        at Main.main(Main.java:5)
/*******************************/
Here a POM file

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>groupId</groupId>
    <artifactId>Java3D</artifactId>
    <version>1.0-SNAPSHOT</version>

    <repositories>
        <repository>
            <id>bubblecloud-cloudbees-release</id>
            <name>bubblecloud-cloudbees-release</name>
            <url>http://repository-bubblecloud.forge.cloudbees.com/release/</url>
        </repository>
    </repositories>

    <dependencies>

         <dependency>
            <groupId>org.bubblecloud.jbullet</groupId>
            <artifactId>jbullet</artifactId>
            <version>2.72.2.4</version>
        </dependency>


        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.5.2</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.5.2</version>
        </dependency>

            <dependency>
                <groupId>org.jogamp.gluegen</groupId>
                <artifactId>gluegen-rt-main</artifactId>
                <version>2.0.2</version>
            </dependency>

            <dependency>
                <groupId>org.jogamp.jogl</groupId>
                <artifactId>jogl-all-main</artifactId>
                <version>2.0.2</version>
            </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <archive>
                        <manifest>
                            <mainClass>Main</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

How to fix it? I tried just to add gluegen-rt.dll file in path with jar but it gives another exceptions.