Login  Register

java.lang.UnsatisfiedLinkError in an app packaged with jpackager

Posted by eazycncn on Dec 14, 2019; 4:30pm
URL: https://forum.jogamp.org/java-lang-UnsatisfiedLinkError-in-an-app-packaged-with-jpackager-tp4040180.html

I'm moving my application to use jpackager.
This works in macOS.
On Windows 10 I get following error:


java.lang.UnsatisfiedLinkError: Can't load library: C:\Program Files\EazyCNC\app\natives\windows-amd64\\gluegen-rt.dll
        at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.base/java.lang.Runtime.load0(Unknown Source)
        at java.base/java.lang.System.load(Unknown Source)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:624)
        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:427)
        at com.jogamp.common.os.Platform$1.run(Platform.java:317)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:287)
        at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:147)
        at swing.SwingWidgetFactory.greateOpenGLView(Unknown Source)


In Windows the jpackager creates an installer that unpacks the code to

C:\Program Files\EazyCNC\

and all the jars into

C:\Program Files\EazyCNC\lib

and all jogl stuff to

C:\Program Files\EazyCNC\lib\jogljars11

which contains these files:

gluegen-rt-natives-linux-amd64.jar
gluegen-rt-natives-macosx-universal.jar
gluegen-rt-natives-windows-amd64.jar
gluegen-rt.jar
gluegen.jar
jocl-natives-macosx-universal.jar
jocl.jar
jogl-all-natives-linux-amd64.jar
jogl-all-natives-macosx-universal.jar
jogl-all-natives-windows-amd64.jar
jogl-all.jar
jogl.jar

I'm at loss how to debug this further or what to try so I'm asking for ideas.

FYI: I'm using jdk-11.0.2 but jpacke is from jdk-13 because the 11.0.2 version has bugs.

wbr Kusti