Where do I place a Java 7 jre bundled with a Mac RCP app? [message #1237454] |
Wed, 29 January 2014 19:21 |
Steven Darnell Messages: 19 Registered: November 2010 |
Junior Member |
|
|
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.
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.
Bug 374791 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:
RCPapp.app
|-> configuration/config.ini
|-> Contents
|-> Info.plist
|-> MacOS
|-> RCPapp (launcher)
|-> RCPapp.ini
|-> Resources
|-> plugins/*.jar
Here is my launcher ini file:
-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
The patch 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.)
Where do I place the Oracle Java 7 jre directory for this configuration to work?
[Updated on: Wed, 29 January 2014 19:22] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02693 seconds