Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnsatisfiedLinkError: Can't load library (nativewindow_awt, or other libs than gluegen) #29

Open
jzy3d opened this issue Dec 16, 2022 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@jzy3d
Copy link
Owner

jzy3d commented Dec 16, 2022

Depending on your code, the GLProfile class gets never called which prevent the JOGL jar from being expanded.

A possible fix is to invoke GLProfile.initSingleton(); at the beginning of your program. This will force the jars to be expanded and then you do not miss any lib.

How to debug native library loading issues

  • Enabling -Djogamp.debug.JarUtil -Djogamp.debug.JNILibLoader will display the jar extraction and native libs loading
  • The first to be mentioned in console should be Gluegen.
  • Find something looking like : JarUtil: EXTRACT[1]: [gluegen_rt -> ] natives/macosx-universal/libgluegen_rt.dylib -> /var/folders/d2/85g_sxm91rg71yyky4gg6l6h0000gn/T/jogamp_0000/file_cache/jln7779685231866426360/jln1167618764182536803/natives/macosx-universal/libgluegen_rt.dylib: 85840 bytes, addedAsNativeLib: true
  • Search if the folder containing libgluegen_rt.dylib if it also contains other dylibs. There should be 6 including gluegen.

Classes triggering jar expansions

For JOGL developers :

  • gluegen : Platform.java (static initializer calls JNILoaderBase.addNativeJarLibs)
  • jogl : GLProfile.java (if not, call GLProfile.initSingleton();)
  • NWJNILibLoader, NewtJNILibLoader, etc
@jzy3d jzy3d added the bug Something isn't working label Dec 16, 2022
@jzy3d jzy3d added documentation Improvements or additions to documentation and removed bug Something isn't working labels Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant