Login  Register

Re: Packaging JOGL projects to be cross-platform?

Posted by Xerxes Rånby on Jan 21, 2014; 8:52am
URL: https://forum.jogamp.org/Packaging-JOGL-projects-to-be-cross-platform-tp4031261p4031262.html

Please take a look at: http://jogamp.org/wiki/index.php/JogAmp_JAR_File_Handling
you need to place the natives inside a folder named natives with a subfolder for the os.and.arch:

If you want to use fat-jar you need to use the following jar layout.
 /com/lala1/Lala1.class
 /com/lala2/Lala2.class
 /natives/<os.and.arch>/libLala1.so
 /natives/<os.and.arch>/libLala2.so

We have some test scripts inside gluegen that we use to test this fat-jar functionality
gluegen/test/TestMultiAndFatJar
http://jogamp.org/git/?p=gluegen.git;a=tree;f=test/TestMultiAndFatJar;hb=HEAD


It is also possible to bundle all JogAmp jars inside the main jar if your classloader supports jar-in-jar resources. jar-in-jar is known to work using the Eclipse
"export as runnable jar"  -> "         + Library handling:
           Package required libraries into generated JAR"
deployment option.

cheers
Xerxes