Java on Apple is dooooooomed

June 22, 2007 8:47 AM

Another day, another blog post about how Java on OS X is dooooooomed. These posts follow a reasonably predictable formula:

  • Apple is late releasing Java 6
  • The latest Java 6 DP is Leopard-only
  • The Cocoa-Java bridge has been deprecated
  • Steve Jobs said "Nobody uses Java anymore"

Therefore, Apple is dropping support for Java.

Therefore, Apple is dooooooomed.

Let's address these points one at a time.

Apple is late releasing Java 6

The two major vendors in Java-land are Sun and IBM. Sun, obviously, needs to support Solaris. They also need to support Windows and (more recently) Linux, because without those two platforms on board any claim to "write once, run anywhere" is laughable. IBM has its own JDK. The current stable version is 5.0, with a Java 6 implementation available as a developer preview.

What's the current stable Java version for HP-UX? For FreeBSD? For Tru64?

5.0

This puts Apple behind Sun (duh), on a par with IBM, slightly ahead of the remainder of Unix-land and, it's worth mentioning in passing, light-years ahead of Microsoft and the Linux vendors who don't even maintain their own JDKs any more (hands up if you remember waiting for the Linux Java ports from blackdown.org).

The latest Java 6 DP is Leopard-only

This doesn't necessarily mean that the final Java 6 release will be confined to Leopard, but let's assume it's the most likely eventuality. What does this mean for the Java platform on OS X? Firstly, any software written against Java 6 will be Leopard-only. Secondly, developers looking to write Java 6 code on the Mac will have to upgrade.

The vast majority of Java software is bespoke development. The general rule for all this software is that you don't get to choose what version of Java you use. The deployment platform determines the Java version you are targeting. In the vanishingly small possibility that you are contracted to a company looking to deploy Java applications on a Mac this year, you're confined to Java 5. Big deal, so is everyone writing for Websphere or Weblogic.

It's even worse if you're writing shrink-wrap software. I haven't even written a single line of commercial Java 5 code yet, because there are still stragglers living in the dark ages. The general rule is that if it hasn't been end-of-lifed yet by Sun, we're going to get complaints if we don't support it.

As for developers, if you want to write Java 6 code, you'll probably have to spend $129 on an OS upgrade. According to Steve Jobs' WWDC keynote, two thirds of OS X users are running the most recent version of OS X (Tiger). Given that developers are notorious early adopters (doubly so if you're developing against the bleeding-edge of Java), are you really trying to tell me the upgrade is a huge impediment to writing code?

The Cocoa-Java bridge has been deprecated

The Cocoa-Java bridge was deprecated for two reasons:

  1. Java imposed a significant runtime overhead for Cocoa apps, and was a bad fit for the Cocoa framework's heavy use of dynamic typing
  2. Nobody was using it to write OS X applications

Actually, this is really one reason, as the two feed quite neatly into each other. Every book or article I read on Cocoa development had one piece of advice regarding the Cocoa-Java bridge. Don't. The Mac developer community responded by producing a plethora of incredibly useful, innovative and powerful applications, none of which were written in Java.

There are two significant general-purpose desktop applications on the Mac that are written in Java. The Azureus Bittorrent client, and NeoOffice. Only the latter uses the Cocoa-Java bridge. Java developers like to talk about how Apple is shooting itself in the foot by deprecating the bridge, but the Java community had five years to develop compelling Cocoa-Java applications, and they came up with one, a UI built on top of the (C++) OpenOffice suite.

Maintaining the Java bridge to support one application doesn't really make much sense. Instead, Apple has changed its focus to a universal bridge. Apple is supporting the bridge for Ruby and Python out of the box, but both of these implementations emerged from community efforts to write such bridges without Apple's involvement. If the Java community was really interested in doing more than complaining about the dropped support, they could do the same.

Steve Jobs said "Nobody uses Java anymore"

He was talking about the iPhone.

Maybe there are a lot of fantastic (i.e. not games) Java applications written for cell-phones. None have gathered any kind of mass-market appeal. Meanwhile I've never been able to get a decent cell-phone Java SDK for the Mac, so I really don't see this to be a huge change in the status quo for Mac-based J2ME developers.

Therefore, Apple is dropping support for Java

As far as I'm aware, the Java team inside Apple is pretty small. I don't know the exact numbers myself, but I've never heard the team described as being more than a handful of developers.

They've done some great work over the years, first integrating Java tightly with Cocoa and Aqua, then painstakingly unravelling the two for the Java 5 release. Their class data sharing work was pulled back into the Java standard. But still, it's always been a pretty small team, working towards the goal of having a Java version on OS X that's reasonably current.

Given the popularity of Macs among Java developers, something Apple must be aware of, having that 'couple of guys' continue to work on Java support in OS X makes good economic sense. Having a larger team devoted to getting new JDK releases out and polished on the same time-frame as Sun, tested against a wider range of OS versions, doesn't.

Therefore, Apple is dooooooomed

The 1990's called. They want their catch-phrase back.

Previously: Relevance is not Symmetrical

Next: Stupid Mental Tricks: remembering alarm codes