He is a entrepreneur and a software architect from Tel Aviv, Israel. He is also a technology freak with about 20 years experience working with computers. He is currently working on his first private initiative in the area of software development tools. His vision is to maximize the abilities of software developers by providing pragmatic tools that enable them to get fast results. Zviki has posted 36 posts at DZone. You can read more from them at their website. View Full User Profile

Eclipse Galileo for Mac: Cocoa or Carbon?

06.24.2009
| 44243 views |
  • submit to reddit
Eclipse Galileo (3.5) is released today. Mac users downloading the new release will notice that, unlike previous releases, they have some interesting choices to make. They need to choose between "Mac OS X (Carbon)" and "Mac OS X (Cocoa)". There's also a third choice, which is currently not mainstream, the "Mac OS X (Cocoa) 64 bit". So, which version is right for you?

Answer: Download the 32-bit Cocoa implementation. Here's why.

Here's a brief and (over?) simplified background:

  • The Mac OS X provides a native API called Cocoa. It replaced the earlier implementation called Carbon. Carbon is being phased out and one of its' main limitations is that it is only 32 bit. 
  • Java 6 for Mac OS X, introduced last year, is 64 bit only. This is, BTW, a real annoyance, since you must have a 64 bit capable CPU to run it, i.e. an Intel Core 2 Duo. 
  • SWT is the GUI framework behind Eclipse. It is written in Java, but it is different from other Java GUI frameworks (like Swing or AWT) in the fact that it actually wraps the OS native UI widgets, providing native look and feel in each OS. This means SWT has a different implementation for each OS. 
  • The current SWT implementation for OS X is based on Carbon.  Thus, it cannot use Java 6 on OS X (at least not the Apple JDK).

There has been an effort to release a Cocoa version of SWT for Mac in the Galileo time frame. It was clear that the Carbon SWT is a dead end. This release is finally ready.

Now back to the main question: which one should you use?

Let's first clear the 64 bit issue. You can use the 64 bit Cocoa implementation. It requires Java 6, which is available on Leopard (OS X 10.5.x) only and requires an Intel Core 2 Duo processor (not Core Duo). If you bought a new Mac in the last 2 years, you are likely there. You can check your processor by selecting "About this Mac" from the Apple menu. 

You will need to use it if you have an Eclipse plugin which requires Java 6 to run or if you are developing such a plugin or an RCP application (which means you are limiting your target audience). I am not familiar with any popular Eclipse plugin which specifically requires Java 6. You may also use it if you intend to break the 32-bit memory addressing limit with your Eclipse IDE (which is almost 4 GB). 

In all other cases, there's no reason to use Java 6. From my initial tests it does not feel faster. Plus, it has limitations like the inability to run the SWT_AWT bridge (some plugins may use it). It uses more memory which is obvious since addresses take more space. You can, BTW, develop Java 6 applications with Eclipse running on Java 5. 

My current recommendation is: don't bother. Use the plain 32-bit version. If you still want to test it yourself, the 64-bit version can be downloaded here.

Back to the main question: Cocoa or Carbon?   First of all, they look the exactly same. Although Carbon is more mature and thoroughly tested, the new Cocoa implementation offers advantages and improvements. There are some obvious features like Sheet support, which is implemented in a few places like the "save as" dialog. However, it's the little things that make the big difference.

Here's just a few examples:

  • Improved behavior of the Zoom button (the green button in the title), finally.
  • Much better Spaces support. 
  • Plays nice with the Dock when it is positioned on the left of the screen.

These are all minor issues, but they make your life much better. I'm sure you will appreciate the Cocoa Eclipse. I do.

From http://blog.zvikico.com/

Published at DZone with permission of its author, Zviki Cohen.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Tags:

Comments

cax queiroz replied on Thu, 2009/06/25 - 2:37am

Moved away from 32 bits ;). 10.6 rocks!!! so does Eclipse 3.5 X86_64 :).

Grant Gayed replied on Thu, 2009/06/25 - 9:04am

The intent of the Cocoa port is to replace the Carbon port, so it's important that app developers adopt the Cocoa port so that any new bugs introduced by it can be logged and fixed before the Carbon port disappears in some future release.

Nirmal Singh replied on Sun, 2009/07/19 - 5:09pm

I am in real dilemma here. Not sure which one is which. I got two different eclipse sdk from eclipse.org, one of them were labelled as "carbon" another one as "cocoa". The "cocoa" version doesn't seem to compile/run anything at all but the carbon version does. I looked into the installed plugins in both version and they both show plugins for "swt.carbon" and not cocoa! Am I missing something? My question is: is cocoa eclipse is already out there, has anybody tried it? I recently got a MacBrook Pro and trying out the new eclipse at eclipse.org for mac ox x leopard.

Liezel Jandayan replied on Wed, 2012/05/23 - 7:28pm

The really big deal here is that you don't need do anything special to the startup to be able to attach on demand with any of the monitoring and management tools in the Java SE platform. -Tire Works

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.