MacBook Developer Machine with Eclipse 3.1

Last friday I got the MacBook Pro. It’s a 2GHz opt out with 2GB RAM. A lightning fast machine for all developer related tasks (especially when compared to my old Powerbook).

To use the MacBook for all programming tasks I need a number of different applications. I want them to run native on the MacBook to have the best possible performance. XCode, ruby and TextMate are universal already. For the following tools and apps there was more to do than downloading.

  • Subversion: Download the latest source code package of subversion from subversion.tigris.org. Expand the file and run the following commands in the Terminal.
    1. ./configure
    2. make
    3. sudo make install
    4. add “/usr/local/bin” to your shell path to use the subversion command line tools
  • Eclipse 3.1.2:

    There is no Eclipse 3.1 build that does start on the intel machines. The latest Eclipse 3.2 milestone 5 is already a universal binary. Unfortunately my current project depends on SWT 3.1 and therefore I have to use the latest 3.1 stable version.

    The SWT library has to be loaded by the Java virtual machine. Of course the Java virtual machine is already compiled for the intel platform. It isn’t allowed to mix the architecture (PPC and Intel) of a host program (the VM) and it’s libraries (SWT). Therefore the Java VM must have access to an Intel version of SWT.

    So a quick recompilation of the SWT sources and a little bit of repacking and you get an Eclipse 3.1 build that starts on the intel machines. The “Eclipse.app” is still a PowerPC executable but this shall not harm performance as is used to startup the Java VM only.

    To make things even simpler I found a little shell script on a forum which does this job (contributions to the guy with the nickname vvyytenk). The script is for eclipse version 3.1.1. I’ll adopted the original script to work with the latest stable version 3.1.2.

    Patch for SWT and Eclipse 3.1.2

    To apply the patch do the following:

    1. download Eclipse 3.1.2
    2. run the patch in the download directory.

    The script expands Eclipse and recompiles SWT. Developer tools must be installed on your machine.

It works for me but I am not responsible for any damage that results from using this patch.

8 Responses to “MacBook Developer Machine with Eclipse 3.1”

  1. Per Ejeklint Says:

    Thank’s a lot! I’ve been struggling with Eclipse 3.2M5 but couldn’t get it to work with the plugins I needed and had to revert to 3.1.2. Your script works perfectly and I now have a stable and fast Eclipse!

  2. Scott Moore Says:

    Martin,

    Thank you very, very much for your patch.

    I looked at your script and tried to modify it to patch my current installation of Eclipse 3.1.2 in-place; and I still couldn’t start Eclipse (though this may have been because I have MyEclipse 4.1.1 installed on top of Eclipse, or maybe I just didn’t modify the patch script correctly).

    So I re-downloaded the Eclipse 3.1.2 install package, used your original patch script to compile & install it, re-installed MyEclipse 4.1.1 on top of it, and everything seems to be working fine so far.

    Just wanted to mention the above to help out any MyEclipse users that may be having similar problems.

    Thanks again!

    –Scott

  3. Aidan Says:

    Thanks for the script - saved me a lot time and hassle :-)

  4. b7kich Says:

    Awesome! Thanks!

  5. gav Says:

    Thanks for this!

  6. Heiko Says:

    Hi!

    Just for info: there’s a “official” Unibin SWT release for Eclipse 3.1. It can be found on Eclipse.org. Just donwload the swt.jar and replace it with the exisiting one. Funny detail: It’s much faster than the build included with the 3.2m5!

    Ciao, Heiko

  7. martin Says:

    Thanks for the hint, Heiko. I checked the Eclipse 3.1.2 dowload page but did find only a PPC version of SWT. Can you post the link for the download?

  8. martin Says:

    Heiko has send me a link regarding the SWT universal binary that could be of interest.

    https://bugs.eclipse.org/bugs/show_bug.cgi?id=98889