Problem when exporting my application to a .jar file

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem when exporting my application to a .jar file

Hubert
Hello,

I need some help with Jogamp. The situation is the following: I have an eclipse project "JOGL", set up as described in the tutorial, and an application "Quarto" that imports the JOGL project. When running the application from eclipse, everything works perfectly. The problem is that when I export the application to an executable jar file, it does not run anymore.

Some more details: the error message I get is

Catched FileNotFoundException: F:\blabla\Quarto\Quarto-natives-windows-i586.jar (The system cannot find the file specified), while TempJarCache.bootstrapNativeLib() of jar:file:/F:/blabla/Quarto/Quarto-natives-windows-i586.jar!/ (file:/F:/blabla/Quarto/ + Quarto-natives-windows-i586.jar)

Exception in thread "main" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path (...)


I can solve the UnstatisfiedLinkError by adding to the library path a folder with the native dll's that I found in the jogamp-all-platforms.7z archive. By doing this I can run the application, although the FileNotFoundException is still there. However, I was under the impression that the native jar's (gluegen-rt-natives-windows-i586.jar,...) allowed to not use the native dll's. Am I in the wrong here and do I absolutely need the dll files? If I am right, how do I ensure that the native jar's are exported with my application?


Thank you in advance for your answers.
Reply | Threaded
Open this post in threaded view
|

Re: Problem when exporting my application to a .jar file

Xerxes Rånby
Reply | Threaded
Open this post in threaded view
|

Re: Problem when exporting my application to a .jar file

Hubert
Thank you for your answer. I will be waiting for this fix :-)
Reply | Threaded
Open this post in threaded view
|

Re: Problem when exporting my application to a .jar file

gouessej
Administrator
You can probably work around this bug. I use Eclipse, I create and sign my JARs with an Ant script and it works. You have a problem if you try to make a fat JAR containing the native libraries which is a bad idea most of the time because it defeats the purpose of minimizing the updated data when using Java Web Start and if you try to deploy your application as a standalone JAR, it might be opened by an archiver (WinRAR under Windows, Ark under GNU Linux) instead of being launched.
Julien Gouesse | Personal blog | Website