Need help in installing Jogl

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

Need help in installing Jogl

skypatcher
I had developed some Jogl apps many years ago using Eclipse. They all worked fine before.  I had a new Eclipse installation on another PC. I downloaded jogamp-all-platforms.7z and follow the instructions in
https://jogamp.org/wiki/index.php?title=Downloading_and_installing_JOGL

I changed all javax.media.* to com.jogamp.*. All files compile correctly. But when I run it inside Eclipse, it give me the following error:
      java.lang.NoClassDefFoundError: com/jogamp/opengl/GLEventListener

I tried two approaches: native jar, and native dll. But they give the same error.

Can someone please help.  Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: Need help in installing Jogl

gouessej
Administrator
Hello

Something is wrong in the libraries used by your Eclipse project. If I were you, I would put only jogamp-fat.jar into the libraries of your project. Have you read that?
https://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE#Add_the_user_library_to_your_project.27s_dependencies

By the way, I have used Eclipse with JOGL since 2006 and it works like a charm. I currently use JOGL 2.3.2 with Eclipse 2018-12 and OpenJDK 11.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Need help in installing Jogl

gouessej
Administrator
In reply to this post by skypatcher
You should find this line in your .classpath file:
<classpathentry kind="lib" path="jogamp-fat.jar"/>

It works in my Eclipse project:
http://svn.code.sf.net/p/tuer/code/pre_beta/.classpath
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Need help in installing Jogl

skypatcher
Thanks for the reply.

Jogl works in my old installation.  But the jogamp-all-platforms.7z as suggested by the Jogl page do no have jogl-fat.jar.
It has jogl-all.jar and gluegen.jar.

And the package name are different.  I change the package names as suggested by the web page.
But the imports, for example,    com.jogamp.opengl.GL2  does not work any more.
Reply | Threaded
Open this post in threaded view
|

Re: Need help in installing Jogl

Xerxes Rånby
you find the jogamp-fat.jar "the one jar fits all solution" at

Den sön 9 juni 2019 kl 09:45 skrev skypatcher [via jogamp] <[hidden email]>:
Thanks for the reply.

Jogl works in my old installation.  But the jogamp-all-platforms.7z as suggested by the Jogl page do no have jogl-fat.jar.
It has jogl-all.jar and gluegen.jar.

And the package name are different.  I change the package names as suggested by the web page.
But the imports, for example,    com.jogamp.opengl.GL2  does not work any more.



If you reply to this email, your message will be added to the discussion below:
http://forum.jogamp.org/Need-help-in-installing-Jogl-tp4039825p4039844.html
To start a new topic under general, email [hidden email]
To unsubscribe from jogamp, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Need help in installing Jogl

skypatcher
Thanks Xerxes Rånby!

The jogamp-fat.jar link you provided solved my problems. It works instantly!!!
Now my old jogl apps works again.

The instruction in Jogl web page's instruction is confusing and misleading.  It leads you to multiple pages
and links, all end up frustrating and useless.  Wish they put your link on their home page.

Just out of curiosity, they all produce the following warning. It does not affect the actual running.
I am happy with the way it is now. Should I worry about them in the future release?

Thanks again!

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary$3 (jogamp-fat.jar) to method
                     java.lang.ClassLoader.findLibrary(java.lang.String)
WARNING: Please consider reporting this to the maintainers of com.jogamp.common.os.NativeLibrary$3
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Reply | Threaded
Open this post in threaded view
|

Re: Need help in installing Jogl

gouessej
Administrator
No you shouldn't worry, we already know how to fix that, it will be done in a future-proof release that might be compatible only with Java >= 11.
Julien Gouesse | Personal blog | Website