Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » how do I bundle a jre with an RCP appl on Mac OSX
how do I bundle a jre with an RCP appl on Mac OSX [message #1102156] Thu, 05 September 2013 08:45 Go to next message
Tom Brus is currently offline Tom Brus
Messages: 25
Registered: February 2011
Junior Member
Hi,

We are making an RCP appl with kepler.
I want to ship the jre's with the appl.
On windows I can just ship a jre dir in the root, no problem.

On the Mac (10.8.4) it does not seem to work, at least not in an obvious way.
I downloaded the latest 1.7 jre (25) for Mac from the oracle website.

I tried the following:

  1. unzip it and put it in a jre dir in the root => not used, falling back to system jre
  2. same and put '-vm' in the ini => error saying 1.6.0_51 is not supported (huh? I do not even have 1.6)


I tried exporting an appl (with bundled jre) from eclipse using the product definition. That works but when I look at the generated appl tree I see a jre dir with another jre dir inside it ??? The inner jre dir seems to be a (partial) duplicate of the outer one.

Ok, sort of at least, now I tried to copy my downloaded jre dir inside itself. That works, but if I remove the contents of one of them it does not work anymore Shocked and I do not really want to ship a double jre.

Can anybody shed some light here?
What is the optimal way to bundle a jre with an RCP application on Mac OSX?

Thanks,
Tom
Re: how do I bundle a jre with an RCP appl on Mac OSX [message #1105444 is a reply to message #1102156] Mon, 09 September 2013 17:59 Go to previous messageGo to next message
Tom Brus is currently offline Tom Brus
Messages: 25
Registered: February 2011
Junior Member
Hmm, nobody knows....

Can anybody point me to the source code in the product exporter where that jre is copied in Kepler?

-Tom
Re: how do I bundle a jre with an RCP appl on Mac OSX [message #1123351 is a reply to message #1102156] Wed, 02 October 2013 09:30 Go to previous messageGo to next message
Marcel A. is currently offline Marcel A.
Messages: 131
Registered: July 2009
Senior Member
I have the same problem under MacOSX. I found no solution until now. Very annoying.
Did anyone know a solution?
Re: how do I bundle a jre with an RCP appl on Mac OSX [message #1123417 is a reply to message #1123351] Wed, 02 October 2013 10:43 Go to previous messageGo to next message
Tom Brus is currently offline Tom Brus
Messages: 25
Registered: February 2011
Junior Member
Good to know I am not alone Wink...
Re: how do I bundle a jre with an RCP appl on Mac OSX [message #1126360 is a reply to message #1102156] Sat, 05 October 2013 09:06 Go to previous message
Marcel A. is currently offline Marcel A.
Messages: 131
Registered: July 2009
Senior Member
I think i found a running solution. After hours of searching the internet and dozens of unsuccessful tries i did the following:

I copied an installed JDK to my RCP folder, renamed it to jre and then adjusted my product *.ini file to use a different vm in a relative folder.

-vm
../../../jre/Contents/Home/jre/bin/java
-vmargs
-XX:MaxPermSize=256m

....etc.

It is important that after the -vm flag a linbreak occurs and it is written before the -vmargs arguments.

A relative path was important for me so that i can distribute the product.

After the first successful start i removed all files from the JDK Home folder except the jre folder.

I do not know why i have to copy the folder structure like this but it worked.

Maybee this approach also works with an JRE and a similar folder structure.

Here my folder structure as an overview and help:

....
....
MyApp
configuration
features
jre
...../Contents/
..................Home/
...........................jre
..................info.plist
..................MacOS
p2
plugins
readme

I hope this information also works for you.

[Updated on: Sat, 05 October 2013 11:57]

Report message to a moderator

Previous Topic:My update site does not work very well...
Next Topic:How to create TreeViewer with Action/Handler
Goto Forum:
  


Current Time: Thu Aug 21 04:17:24 EDT 2014

Powered by FUDForum. Page generated in 0.01652 seconds