title: How to bundle a jar with Apple's new Java 6 for Mavericks, et al?
body: <p>Java on Mac OS X has been an enormous headache.  </p>
  
  <p>Apple first made it clear they were turning Java releases over to Oracle, who provided only Java 7 and the <a href="https://java.net/downloads/appbundler/appbundler.html" rel="nofollow">AppBundler</a> Ant task to package jars (and natives). </p>
  
  <p>Oh, and Apple began insisting that App Store submissions use the AppBundler feature that copies the entire JRE - over 60mb. Yikes! So nothing to do but grind teeth and join the bloatware bandwagon...</p>
  
  <p>Magically there is now a JRE 6 for Mavericks (published October 2013, but we weren't paying attention because Apple said their Java support was over). The packaging tool for JRE 6 is the old <a href="http://informagen.com/JarBundler/" rel="nofollow">JarBundler</a> Ant Task, which does not support copying the JRE into the bundle. </p>
  
  <p><strong>So here is the question: How to meet the new App Store standard of packaging the JRE with the app when the JRE 6-compatible bundling tool won't do it?</strong></p>
  
  <p>NB: JarBundler uses an <em>Apple</em> binary <code>JavaApplicationStub</code> to invoke the JVM.  Having the stub look for the JVM inside the app bundle may be impossible? I cannot find any documentation on this.</p>
  
  <p>FWIW, I need JRE 6 not just for the smaller footprint (about half the size), but also because JOGL (OpenGL Java binding) works great under 6 and is unusable under 7. Oracle diddled with the Swing innards in ways the JOGL guys (who are great by the way) haven't yet (after over a year) fully worked out.</p>