Error when start jar builded by Maven

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Error when start jar builded by Maven

ChazAshley
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.
Reply | Threaded
Open this post in threaded view
|

Re: Error when start jar builded by Maven

gouessej
Administrator
Hi

Sorry but we aren't responsible for those unofficial Java3D JARs not provided by the JogAmp community and it seems to use an old version of JOGL. Rather follow these instructions.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Error when start jar builded by Maven

ChazAshley
Thanks for answer!
Reply | Threaded
Open this post in threaded view
|

Re: Error when start jar builded by Maven

gouessej
Administrator
You're welcome. A contributor is preparing a Mavenized version of Java3D, it will probably be available in some months:
https://github.com/ctrueden/java3d-core/commit/10c39cbaa7cab7f35389b4a3145a418b7d742288
Julien Gouesse | Personal blog | Website