Posted by
Sven Gothel on
Jan 24, 2014; 3:37am
URL: https://forum.jogamp.org/Packaging-JOGL-projects-to-be-cross-platform-tp4031261p4031316.html
On 01/24/2014 03:55 AM, KevinWorkman [via jogamp] wrote:
> Thank you, that's actually really helpful. I think I'm doing pretty much the
> same thing as you, just on Windows. I've created a Test.jar that contains my
> main class, a ProcessingClasspath.jar that contains all the Processing and
> JOGL classes, and then ProcessingNatives.jar that contains all of the natives.
> However, when I run the command, I get an UnsatisfiedLinkError. Here are the
> contents of each of my jars (I left out ProcessingClasspath.jar because it's
> huge). Strangely, if I create a fat jar out of all of these jars, it works.
>
> Does anything obvious stick out below?
Sorry .. I got it ..
That is a config we do _not_ support [yet],
i.e. you have 3 jar archives:
- ProcessingClasspath.jar [gluegen, jogl, processing classes]
- ProcessingNatives.jar [gluegen, jogl, processing native libs]
- Test.jar [user stuff]
Our 'fat' approach assumes the native libraries
in the same jar file of the classes for gluegen and jogl, i.e.:
- jogl-fat.jar [gluegen, jogl, classes and native-libs]
- Test.jar [user stuff]
or in your case (if possible):
- ProcessingFat.jar [gluegen, jogl, processing classes and native-libs]
- Test.jar [user stuff]
If you cannot do the ProcessingFat.jar,
stuff gluegen's and jogl's classes into your ProcessingNatives.jar.
See:
<
http://jogamp.org/git/?p=gluegen.git;a=blob;f=test/TestMultiAndFatJar/make-fat_and_multi.sh;h=de031be231c51153f44f3b9535a0e145e5f3cef9;hb=2868816971bb80eb226e6edffc527d909ced755b>
Problem is that we need to find the native libs
in relation to the gluegen-rt or jogl-all jar URI
and also validate their signatures if a security manager is enabled.
We would need to introduce a 3rd way of finding your 'ProcessingNatives.jar',
which is not [yet] implemented, i.e. via '-natives-fat' postfix analogue
to '-natives-linux-amd64' etc.
It is possible that we include this, if this path is really necessary.
Maybe you can contribute this yourself ?
At least we should add junit test for all these configurations ..
~Sven