Waiting for Java7 on Mac OS X 10.6.3 “Snow Leopard”

Somehow, it was a good decision to switch OpenChrom to Eclipse 3.7.1 (Indigo) and Java7 except of Mac 10.6.3 “Snow Leopard”. Why on earth do they not support Java7? I don’t know. But I was aware of, that I needed a quick workaround to make it running.

Hence, here’s my solution how to start RCP applications on Mac OS X using Java7:

First of all, create the folder “JavaVirtualMachines” in the directory “/Library/Java“. Unless it’s not created, you’re not able to install the Java7 Developer Preview.

user$ sudo mkdir /Library/Java/JavaVirtualMachines

You can choose between the JDK or JRE package. I took the JDK.

Install it by dragging it into the specified folder.

Now, we need to create a program specific launcher called “start.sh“, but you’re free to choose nearby any name you like. Therefore we dive into the application.app (in this case openchrom.app).

Create a file called “start.sh“.

The content of the starter “start.sh” depends on the specific settings of your RCP application. I took the settings from the application.ini file (in this case openchrom.ini).

#!/bin/sh

export JAVA_HOME=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home
LAUNCHER_JAR=../../../plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar

java \
-Xms128M \
-Xmx500M \
-Dosgi.install.area.readOnly \
-Dosgi.configuration.area=@user.home/.openchrom/0.6.0/OpenChrom/configuration \
-Dosgi.instance.area.default=@user.home/OpenChrom/workspace \
-Dsun.awt.xembedserver=true \
-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts \
-jar $LAUNCHER_JAR

Start the terminal and navigate to the “start.sh” script. It is necessary to set the executable bit once using “chmod a+x“. The RCP application can now be started by starting the script using “./start.sh“.

user$ cd Desktop/0.6.0-PREV/OpenChrom/openchrom.app/Contents/MacOS/
user$ chmod a+x start.sh
user$ ./start.sh

This tutorial presented a workaround for OpenChrom. But it is applicable in the same way for Eclipse and other RCP applications.

Advertisements

About Philip Wenig

Founder of OpenChrom
This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

5 Responses to Waiting for Java7 on Mac OS X 10.6.3 “Snow Leopard”

  1. Pingback: Waiting for Java7 on Mac OS X 10.6.3 “Snow... | Eclipse | Syngu

  2. Gregory says:

    Thank you for the tutorial, however I am having problems with an error, would you happen to know how to fix this? Thanks

    An error has occurred. See the log file
    /Users/bob/.openchrom/0.6.0/OpenChrom/configuration/1338988159886.log.

  3. eselmeister says:

    Hi Gregory,

    I can’t make a statement without having a view into the log file. Please use the contact form (http://www.openchrom.net/main/content/contact.php) to send me the content of the log file.

  4. Gregory says:

    Good day, I’ve sent an email through the contact form
    I included the log file

    I also found out how to fix the problem (by deleting the .openchrom folder in the users directory)
    However, I am still wondering why an error occurs after using the market place
    I hope the log file will help

    Thank you very much

  5. About Java says:

    nice post and thanks for sharing.. 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s