Login  Register

Re: Return of the "java.lang.UnsatisfiedLinkError: Can't load library: /System/Library/Frameworks/gluegen-rt.Framework/gluegen-rt" exception...

Posted by Xerxes Rånby on Jun 01, 2015; 8:34am
URL: https://forum.jogamp.org/Return-of-the-java-lang-UnsatisfiedLinkError-Can-t-load-library-System-Library-Frameworks-gluegen-rt-tp4034549p4034557.html

Alexis Drogoul wrote
Hi,

Thanks for your answers and pointers.

No problem to run the tests under MacOS X 10.10.2 and JDK 1.8 (this is one of the configurations that failed on Eclipse Luna) — jogl is up and running and the jars are picked in the right directory (the "jar" directory within the jogamp-all-platforms folder).
Good!

Alexis Drogoul wrote
Now, under the same configuration, things happen randomly : sometimes it works, sometimes it doesn't.
...

I'm a bit lost, actually. Will continue digging, of course, but I dont know exactly in which direction !

Alexis
Try explain to us how you setup this "configuration" that makes things misbehave using Eclipse Luna.
Does the exception happen only after you export your application using eclipse?

Remember that eclipse has its own classloader that is used to load jar's from inside jars something java normally do not support.
If you use eclipse to export an application as a Java.Runnable_JAR_file then remember that only the following two library handling options work:
Library handling:
           Copy required libraries into a sub-folder next to the generated JAR
Library handling:
           Package required libraries into generated JAR
https://jogamp.org/wiki/index.php/JogAmp_JAR_File_Handling#Eclipse

When you run your application then you may want to enable logging of how JOGL uses gluegen to load the native librarys. This can be done by passing -Djogamp.debug.NativeLibrary to java.