Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Where do I place a Java 7 jre bundled with a Mac RCP app?(I cannot use the -vm option, I need Equinox to find it on its own)
Where do I place a Java 7 jre bundled with a Mac RCP app? [message #1237454] Wed, 29 January 2014 19:21 Go to next message
Steven Darnell is currently offline Steven DarnellFriend
Messages: 18
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

Re: Where do I place a Java 7 jre bundled with a Mac RCP app? [message #1244789 is a reply to message #1237454] Wed, 12 February 2014 22:20 Go to previous message
Steven Darnell is currently offline Steven DarnellFriend
Messages: 18
Registered: November 2010
Junior Member
A colleague informed me that Equinox is looking for a folder named 'jre' containing a Mac OS X JVM (jre/Contents/Home/jre/bin) alongside the RCPapp.app bundle; however, the look-up fails if the absolute path of the jre directory contains a space.

I still cannot get an RCPapp to launch without defining the -vm variable, regardless of the jre path containing a space. Does anyone have any suggestions?
Previous Topic:osgi.framework.extensions does not work with WebStart
Next Topic:Dropins & feature
Goto Forum:
  


Current Time: Fri Nov 28 16:12:15 GMT 2014

Powered by FUDForum. Page generated in 0.08996 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software