After using the built-in self upgrade feature of Eclipse to go from 3.4 to 3.4.1, I was no longer able to launch Eclipse. Instead of the happy Ganymede splash screen, I got a poorly formatted dialog saying “The Eclipse executable launcher was unable to locate its companion shared library.” I discovered that the problem was that eclipse.ini had not been updated to point to the updated launcher library. Here’s how to fix it.
- Open a Finder Window to the Applications directory, or wherever you installed Eclipse
- Expand the plugins directory
- Scroll down to the directory starting with the name “org.eclipse.equinox.launcher.carbon.macosx_”
- Copy the text of the name following “carbon.”. After the update, mine was 1.0.101.R34x_v20080731.
- Right click Eclipse.app and select Show Package Contents
- Expand the Contents and MacOS directories
- Open eclipse.ini in a text editor
- Look for two lines that look like
- Change the part after “_” to the text you copied above
- Close and save changes to eclipse.ini
- Restart Eclipse
--launcher.library ../../../plugins/org.eclipse.equinox.launcher.carbon.macosx_1.0.100.v20080509-1800
In case you weren’t aware of this, you can also edit eclipse.ini to change the vmargs Java will use when launching Eclipse. For example, if Eclipse itself is running out of heap, you might want to boost the min and max heap size with something like:
-Xms64m -Xmx512m
Of course, you should also click “Show heap status” in the General section of the Preferences dialog so you can monitor how much heap is being used and can force a GC before a big compile. You shouldn’t boost the min heap size from the default, though, unless you blow past it pretty quick and experience initial sluggishness as the heap keeps getting expanded.