Login  Register

Re: ZipException when loading native jars

Posted by ryanmohr on Dec 05, 2012; 6:31pm
URL: https://forum.jogamp.org/ZipException-when-loading-native-jars-tp4027387p4027416.html

Sven Gothel wrote
Test-1 is not Jar-In-Jar, but simple Side-by-Side,
hence it's simply the default case.

    ./lala01.jar
    ./lala01_lib/jogl.all.jar
What strikes me as odd is that it's using the name of the jar file to determine the lib path.  Normally I'd expect to see something more like this:

./lala01.jar
./lib/jogl.all.jar


Sven Gothel wrote
as long the extracted stuff by Onejar will result in something like:
 /wherever/
   jogl-all.jar
   jogl-all-natives-linux-amd64.jar
   ...
   gluegen-rt.jar
   gluegen-rt-natives-linux-amd64.jar
   ...

it should work.
Only problem I see with onejar is that the main jar never sits beside the dependencies.  Onejar is very specific about the folder structure.  Has to look like this:

main/
  application.jar
lib/
  [all other jars]


Sven Gothel wrote
Can you provide a test case?
  - a project which builds a onejar binary? (-> all open source)
  - a onejar binary ? (-> if onejar is not open source)
If I'm not able to get things working based on your suggestions I'll create a project on github that demonstrates the issue.


Sven Gothel wrote
Is Onejar freely available ? Is it open source ?
Yes, free and open source on source forge (http://one-jar.sourceforge.net/)