Login  Register

Re: UnsatisfiedLinkError: jogamp.nativewindow.jawt

Posted by Gaël on Feb 26, 2016; 4:06pm
URL: https://forum.jogamp.org/RE-OPEN-UnsatisfiedLinkError-jogamp-nativewindow-jawt-tp4036242p4036375.html

I followed your advise so I commented the call to my class and I add all natives jar as dependencies to my plugin. They re in my bundle_pool folder, same level as jogl and gluegen jar.

Here s the error :
java.lang.UnsatisfiedLinkError: Can't load library: C:\FPP\eclipse\natives\windows-amd64\\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:624)
        at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:63)
        at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:106)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:487)
        at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:421)
        at com.jogamp.common.os.Platform$1.run(Platform.java:317)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:287)

I don't even know from where it finds this path. (FYI "C:\FPP\eclipse" is my eclipse installation folder and there isn't a "natives" folder)

I'm actually running on a 64-bit JVM.
About the custom loader, may be I used a wrong term. I mean, because I develop an eclipse plugin, jogl can t find the requested nat libs (I don't know why but the automated loading doesn't work) so I have to copy them from my plugin to a tmp folder and set the path to this tmp folder in java.library.path
This happend at the very begining of my plugin life-cycle

That is what my class do. Thereafter I let jogamp loads nat libraries whenever it wants.
About the nat libs themselves, I put them (good os, arch and jogl version) in my bundle so I'm sure my class exposes good ones.

In addition i noticed that, when i use my class for expose nat libs as I said I have the UnsatisfiedLinkError: jogamp.nativewindow.jawt.JAWTFactory.JAWT_GetAWT1(Ljava/nio/ByteBuffer;)Z, but when i searching for nat libs that were loaded i could see that gluegen-rt and nativewindow_awt were succefully loaded PLUS awt.dll and jawt.dll

Is this normal ?

Odd things too, when i recall the jogamp part, so gluegen-rt and nativewindow_awt are load, I have an other error :
com.jogamp.opengl.GLException: No default device available
        at com.jogamp.opengl.GLProfile.getProfileMap(GLProfile.java:2300)
        at com.jogamp.opengl.GLProfile.isAvailable(GLProfile.java:301)
        at com.jogamp.opengl.GLProfile.isAvailable(GLProfile.java:315)
        at org.jzy3d.chart.Settings.detectProfile(Settings.java:33)
        at org.jzy3d.chart.Settings.<init>(Settings.java:17)