Exporting java GLOOP,jogl,gluegen project in eclipse

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

Exporting java GLOOP,jogl,gluegen project in eclipse

nech
So I want to export my jogl project in eclipse however I get following error when I try to launch it after wrapping the jar to an exe with launch4j (executing the .jar does nothing).

Executing: C:\Users\neche\Desktop\UfoSpiel.exe
Exception in thread "main" java.lang.NoSuchMethodError: 'void com.jogamp.common.util.PropertyAccess.addTrustedPrefix(java.lang.String, java.lang.Class)'
        at jogamp.opengl.Debug.<clinit>(Debug.java:52)
        at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:78)
        at GLOOP.GLRenderer.<init>(GLRenderer.java:90)
        at GLOOP.GLKamera.<init>(GLKamera.java:49)
        at UfoSzene.main(UfoSzene.java:15)

The project works fine in eclipse with the small issue that when launching the app with a set width and height using gloop's GLKamera the window is bigger but just has black bars.

you cannot see very well because of the texture but the game view is smaller than the window
Reply | Threaded
Open this post in threaded view
|

Re: Exporting java GLOOP,jogl,gluegen project in eclipse

gouessej
Administrator
Hello

At first, use a more recent version of JOGL. javax.media.opengl no longer exists in JOGL >= 2.3.2.

Secondly, tell us how you create your JAR containing all dependencies. You have to merge your classes and resources with the contents of jogamp-fat.jar.

Edit.: We don't maintain GLOOP but I can help you to build your own loop without using it.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Exporting java GLOOP,jogl,gluegen project in eclipse

nech
Sorry for the late reply it was getting late but:

I just updated my jogl library and I get following error and now the program doesnt work at all anymore

Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/opengl/GL
        at Punkte.<init>(Punkte.java:4)
        at UfoSzene.main(UfoSzene.java:12)
Caused by: java.lang.ClassNotFoundException: javax.media.opengl.GL
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        ... 2 more

I create my jar by exporting my project to a jar in eclipse then wrapping it in launch4j here are my settings for eclipse





And about Gloop: most of my project is made with gloop and im pretty comfortable with so I dont know if I want to modify the whole project.
Reply | Threaded
Open this post in threaded view
|

Re: Exporting java GLOOP,jogl,gluegen project in eclipse

gouessej
Administrator
You have to modify GLOOP to drive it compatible with the latest version of JOGL which uses another namespace:
https://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/opengl/GL.html

We only maintain the latest version of JOGL. If you keep using an obsolete version of JOGL, you'll be left alone with the bugs we fixed.

Seriously, dropping GLOOP isn't a big deal, have a look at our examples and learn how to deal with an animator, it does most of the job.

Your screen capture doesn't show us all resources you included. If you include only your own classes, it won't work, it's not enough, you have to include the content of jogamp-fat.jar. Rather use Ant to do that:
https://jogamp.org/wiki/index.php?title=JogAmp_JAR_File_Handling#Fat-Jar
Julien Gouesse | Personal blog | Website