So a little background.
I am trying to create a runtime-image for my java application by using JLink. My project uses jogamp-fat.jar, which is an automatic module. Jlink doesn't allow you to create a runtime-image if you have any automatic modules in your project. I ended up figuring out a way to convert jogamp-fat.jar to no longer be automatic by using jdeps and javac --patch-module.
This did allow me to execute JLink, and my application still ran just fine. However, when I run the .bat file created from JLink, I get "java.lang.UnsatisfiedLinkError: Can't load library: ...\ bin\natives\windows-amd64\\gluegen.dll".
I've been scratching my head for a couple weeks with this and can't figure it out. Any help would be appreciated, even if the answer is Jlink just can't be used with jogamp-fat.
Disable the automatic native library loading, put the native libraries somewhere and set the library path. The option to disable the automated native library loading is mentioned in the JOGL user's guide as far as I remember.
So I went to the user guide and added -Djogamp.gluegen.UseTempJarCache=false to my VM options within my NetBeans project. This now causes my project to break when I run it in NetBeans (before only the runtime-image created from jlink broke). It is the same can't load library: "...natives\windows-amd64\gluegen_rt.dll error as before. I've also tried setting the java.library.path within the VM options as well as while the program is running with no success... I am confused as to why when I remove -Djogamp.gluegen.UseTempJarCache=false from my VM options the application will run when executing from NetBeans. Why is it able to find the natives when I run through netbeans, but cant find it when the runtime-image is executed?
So update... I ended up resolving the can't load native library error. I did not realize that I needed to unzip the contents of the gluegen-rt-natives-windows-amd64.jar and jogl-all-natives-windows-amd64.jar. I thought I could just reference the jars without unzipping.