Posted by
Sven Gothel on
Jan 24, 2014; 1:45am
URL: https://forum.jogamp.org/Packaging-JOGL-projects-to-be-cross-platform-tp4031261p4031312.html
On 01/24/2014 01:53 AM, KevinWorkman [via jogamp] wrote:
> Sorry to bother you guys again, but I want to make sure I understand: do the
> JOGL natives have to be in the same jar as the main class?
No.
> Or can they be in
> another jar that's on the classpath?
Yes. (All our applet tests work that way)
>
> I have one jar that simply contains the main class, and then a fat jar that
> contains all of the Processing classpath (including JOGL), as well as all of
> the natives as discussed above.
Whatever pleases you.
Reasoning for us to not use a fat-jar,
is that we like to save some little bandwidth .. thats all.
You may have noticed the *-all* naming in the jar files and the
'atomic' subfolder, they are a relict of a very fine grained deployment.
Later we found the 'reasonable' subset for the jar file (we hope),
i.e. nativewindow, jogl and newt - for desktop and mobile.
>
> If I create a fat jar out of the main jar and the classpath jar, everything
> works fine.
Good.
>
> However, if I try to simply use the classpath jar as a classpath member (using
> java -classpath=Main.jar;Classpath.jar Main), I get an UnsatisfiedLinkError.
>
> I was hoping that JOGL would automatically extract itself from any jar on the
> classpath (especially since the jar contains both the JOGL libraries and the
> JOGL natives), but that doesn't seem to be the case. Am I missing something?
I just tested this case .. it [still] works, see:
<
http://jogamp.org/git/?p=gluegen.git;a=commit;h=2868816971bb80eb226e6edffc527d909ced755b>
~Sven