Login  Register

Re: Packaging JOGL projects to be cross-platform?

Posted by KevinWorkman on Jan 24, 2014; 12:53am
URL: https://forum.jogamp.org/Packaging-JOGL-projects-to-be-cross-platform-tp4031261p4031311.html

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? Or can they be in another jar that's on the classpath?

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.

If I create a fat jar out of the main jar and the classpath jar, everything works fine.

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?