Login  Register

Re: Running a JOGL app from a single JAR file

Posted by sasq on Jan 14, 2015; 9:54am
URL: https://forum.jogamp.org/Running-a-JOGL-app-from-a-single-JAR-file-tp4033846p4033848.html

gouessej wrote
I assume that you would like to create a fat JAR.
I don't know. Would I?
I see that this technique is "discouraged" at the website you provided.

What I want is to make a self-contained JAR file available for download and run by the user which doesn't have any JOGL libraries installed on his machine. If the "fat JAR" solution allows this, then yes, I would like to create one.

On that website they also say:

Furthermore, adding all native library files for all supported platforms will add-up to +3M of _compressed_ jar data!
Could this be avoided by providing a set of several self-contained JAR files, each for one supported platform? This way, they would together still be weighty, but the user could select the one compatible with his platform, which is a fraction of the whole set and less weighty to download, I guess?

Which files should I put into that JAR and in what structure to make it work? I'd like to put there only a minimal set of files which are actually used by my application. How can I figure out which are needed?

Oh, I forgot to add in my original post that I don't use Ant, Eclipse, NetBeans, nor any other IDE, just plain old text editor and a command line on Linux. I'll try to add it to my original post...

Hmm, but it turns out that I have the ant command on my system, so perhaps I could use it somehow... I'll need to dig into the post you linked, but for now it's black magic to me. Can you advice me any additional URLs I should check out to find more about what is this ant and how to use it?