title: How to load native JOGL .jnilib extensions on Mac OSX by exported app.jar?
body: <p>The issue seems to be that on Mac OSX (as opposed to Windows), jogl.jar requires the native extensions be in a particular system path <code>/System/Library/Java/Extensions/</code> (as stated on: <a href="http://cs.gmu.edu/~jchen/graphics/jogl/notes/joglSetup.html" rel="nofollow">http://cs.gmu.edu/~jchen/graphics/jogl/notes/joglSetup.html</a>).</p>
  
  <p>However, I am distributing this app and there's no way I can ask my users to copy random .jnilib files into a system folder, especially when my users are relatively tech agnostic.</p>
  
  <p>I then tried to create a Visualizer.command file with:</p>
  
  <p><code>java -Djava.library.path=./lib/opengl-natives/macosx/ -jar ./viz.jar</code></p>
  
  <p>And put the required libraries in the stated path, however that didn't work, either.</p>
  
  <p>On Windows, merely having the native .dll in the same folder as the .jar file works, but I'm told that on unix systems (like Mac), this doesn't work as unix by default does not load libraries from the current working directory unless otherwise instructed.</p>
  
  <p>EDIT:
  Just as a reference, here's the Visualizer.bat file I have on Windows to do the same library loading:</p>
  
  <p><code>java -Djava.library.path=.\lib\opengl-natives\windows32 -jar parking-viz.jar</code></p>