0
\$\begingroup\$

I have been trying to wrap my fat JAR file into an EXE using Launch4j, but I have been running into problems when I try to execute the EXE. Here is the error log I get from Launch4j:

Executing: E:\Downloads\CasualCaving.exe
JNILibLoaderBase: Caught IllegalArgumentException: No Jar name in <jar:file:/E:/Downloads/CasualCaving.exe!/jogamp/common/Debug.class>
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: E:\Downloads\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)
    at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:147)
    at org.graphics.Render.<init>(Render.java:20)
    at org.engine.Main.main(Main.java:18)

I am using JOGL 2.3.2 imported through Maven, with the assembly plugin to compile it to a fat JAR. Here is a picture of my library configuration:

My project configuration screen

I am not sure what is wrong, as the JAR file works fine.

\$\endgroup\$
  • 1
    \$\begingroup\$ Have you verified that this file exists in the folder it's being sought? E:\Downloads\natives\windows-amd64\\gluegen-rt.dll That double-backslash at the end looks suspicious, like it was expecting a path without a trailing backslash and added one, but the provided path already had one. \$\endgroup\$ – DMGregory Aug 10 at 14:28
  • \$\begingroup\$ @DMGregory that fixed it! I just had to provide all of the JOGL natives for each platform. \$\endgroup\$ – ImTheSquid Aug 10 at 15:14
0
\$\begingroup\$

I figured out that you need to include all native DLLs need for each platform. Just go to the library location and extract the natives from the jar file for the desired platform.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.