title: Where do I place a Java 7 jre bundled with a Mac RCP app?
body: <p>I have an Eclipse 3.8.1-based RCP application for Mac that has been reorganized into an APPL application bundle. I encountered a problem on Mac where I cannot open a file with the app by file association (double-click in Finder) or by drag-and-drop to the Dock/app when the program is closed. The app launches but the file fails to open.</p>
  
  <p>This did not occur when I was using Apple Java 6. I recently upgraded to Oracle Java 7 and started to notice the problem. I am using the -vm argument to define the location of my bundled vm. If I remove the argument, Equinox automatically finds my JDK7 installation and the problem is resolved. I cannot rely on a third-party JDK install; I want Equinox to find my bundled jre without defining the -vm argument.</p>
  
  <p><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=374791" rel="nofollow">Bug 374791</a> states this is supported in 3.8.1. Where do I need to place my jre directory for this to work? Here is the architecture of my bundle:</p>
  
  <pre><code>|-&gt; configuration/config.ini
  |-&gt; Contents
    |-&gt; Info.plist
    |-&gt; MacOS
      |-&gt; RCPapp (launcher)
      |-&gt; RCPapp.ini
    |-&gt; Resources
  |-&gt; plugins/*.jar
  </code></pre>
  
  <p>Here is my launcher in ini file:</p>
  
  <pre><code>-startup
  ../../plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
  --launcher.library
  ../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20120522-1813/eclipse_1503.so
  --launcher.defaultAction
  openFile
  -clean
  -vmargs
  -Xmx768m
  -Dosgi.locking=none
  -Dosgi.requiredJavaVersion=1.7
  -Dvisualvm.display.name=RCPapp
  -Dserver_host=localhost
  -Dcom.dnastar.debugPrint=false
  -XstartOnFirstThread
  -Dorg.eclipse.swt.internal.carbon.smallFonts
  </code></pre>
  
  <p><a href="http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=3011e6a9c0142036bd38851224e8e030936dc858" rel="nofollow">The patch</a> seems to indicate that the java executable should be located in "../../../jre/Contents/Home/jre/bin/" relative to the launcher, so I put my "Oracle jdk directory renamed to jre" along side RCPapp.app and launch. I receive an Incompatible JVM error (Version 1.6.0_65 of the JVM is not suitable for this product. Version: 1.7 or greater is required.)</p>
  
  <p>Is there a "magic" location where the Equinox launcher will auto-recognize a bundled Java 7 jre?</p>