June 2007

« May 2007 | Main Index | Archives | July 2007 »


We just moved into new offices, so of course the building access codes have all changed.

The problem is that since I'm rarely the first person into the office (no laughing at the back, please!) or the last person to leave, the time lag between me being told the new codes and actually having to use them is pretty long. Short of writing them on a piece of paper in my wallet, how to remember them?

The trick I'm trying: every time I get to work in the morning or leave in the evening, I try to remember the code before walking through the door whether I need it or not. Hopefully by the time I actually have to use it, it'll be stuck firmly in my head.

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?


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.

Via JWZ1 I found Wikigroaning: the art of picking two vaguely related subjects on Wikipedia (say Lizards and Dragons), and spotting which article is longer, more carefully written and more thoroughly researched.

(Like I've said before, Wikipedia is fun for just this reason, and the prevalence of what Wikipedians call fancruft doesn't necessarily make the serious articles any less valuable.)

My favourite Wikipedia foible2, however, one that amuses me almost every time I look something up on the site, is the assumption on the part of its editors that relevance is a symmetrical relationship.

Which means that every book, movie, historical figure or event that was mentioned even in passing during just one episode of The Simpsons will have a note to that effect on its Wikipedia page, because that's just what you needed to know about the Franco-Prussian War. (Ditto any popular song that has been covered by some unsigned punk band that played two gigs in a Wikipedia editor's neighbourhood).

1 quoting Something Awful, but JWZ gets to the point faster so that's where I'll link.
2 Well… second-favourite after the List of Notable Llamas, which has sadly now been deleted from the site.