Tuesday, October 30, 2007

Scapegoating for Java crisis on Mac OS X

So, pretty much all Java developers working on Mac OS X are filling up the blogosphere (sorry for using the cheesy term) screaming how Apple left them behind not releasing Java 6 for Leopard. This article (via DF) summarizes the overall sentiment (and somewhat hysterical atmosphere). Apple's own java-dev list is another place where people are raising concerned voices.

It's understandable where this outcry comes from. Go to any major Java conference. The Mac laptops are totally over-represented in the audience.

I could well be among them. I'm guilty of amplifying the "Macs are everywhere" effect at conferences myself with my MacBook Pro. I too am a Java developer working on Mac OS X.

I just see a different perspective to things. First off, it always struck me as actually very unnatural that Sun ships Java for Windows, Linux, and Solaris, but does not ship it for Mac OS X. I don't feel let down by Apple here.

I feel let down by Sun.

Sun already publishes a JDK and JRE for three different OS platforms. How hard would it be for them to publish it for Mac OS X as well?

It appeared to me that Sun just recently started natively supporting OpenOffice on Mac OS X. The concept is not completely alien to them, then.

Looking realistically, what is the supposed rationale behind having Apple ship Java for Mac OS X? My educated guess is that the reasons are twofold:

One, OS X was originally so small marketshare-wise that Sun simply couldn't be bothered. They probably had they doubts about the success of the OS. So Apple undertook porting Java to increase the potential software base of the OS and its overall utility. Remember, Mac OS X at the time was still quite young. Hopefully this has changed by now, especially seeing how lots of Sun employees also use Mac OS X. So there's me hoping that in 2007, Sun could actually be bothered.

Two, Apple provided some Apple-specific functionality, like Swing that looks almost like native Mac UI, plus a Cocoa bridge (which is not updated to keep up with Cocoa improvements for quite some time, and is declared by Apple to not be updated ever again).

Don't get me wrong, but the vast majority of Java developers on Mac doesn't give a shit about either Swing or Java-Cocoa bridge, or anything else there might be. Java isn't doing particularly well on desktops; strong Java market is on the server side. As a consequence, vast majority of Java developers don't deploy their software on Mac OS X. They deploy it on enterprise irons that typically run Linux or Solaris. I'm in this crowd.

Let me repeat: I don't give a flying shit about Mac OS X specific Java functionality. If I wanted to write a Mac desktop app, I'd use Objective-C. If I wanted to write a cross-platform desktop app (ha!), I'd probably first talk myself out of it, and if I really couldn't, I'd go for SWT. I'd be more than happy with Java on Mac that allows me to do my command line and server side stuff. I wouldn't care that it has us an ugly looking UI with Swing (as it does on all other platforms, anyway).

And I firmly believe it is Sun's job to give us one, not Apple's.

If you're following what Apple is doing with its developer strategy, it'd be clear to you Apple doesn't have any interest in Java on Mac OS X, and I can't actually blame them for that. Apple is slowly abandoning lots of technologies. It is slowly abandoning Carbon (Carbon will have no 64 bit support, ever). Apple is slowly abandoning non-Cocoa QuickTime bindings (they too will have no 64 bit support). Apple's developer strategy is unification: everything is Cocoa and Objective-C.

In an interesting twist that seemingly (but only seemingly) contradicts what I wrote above about unification, Apple ships Ruby and Python bundled with the OS. However, please observe that both of these are (a) open source and (b) support compiling on Mac OS X in their mainline source code. That is to say, the original developers of the code provide OS X support by sprinkling required #ifdef blocks around the code. Apple just needs to take it and bundle it, without further tailoring. That's what they do. To Apple, Python and Ruby are just Darwin-level tools. And even if they didn't bundle it, it'd be trivial for anyone to compile them from the source and install. Fink and DarwinPorts can give you newer versions of either if you need them. Neither (a) nor (b) can be said of Java. OpenJDK is not Java. Not yet. Sun is definitely heading in the right direction with open sourcing Java, but they started too late to avoid this particular crisis.

Relying on Apple to deliver the Mac part of the WORA promise was a mistake, one that could be easily seen by anyone for years, as Mac users were getting their JDK updates with six months or longer delays compared to platforms serviced by Sun. Sun would've had plenty of time to act upon this mistake.

Again, is it Apple's fault that we don't have an industry-grade open-source Java implementation that supports Mac OS X in its mainline source code? I don't think so. If you want to be angry at someone, or better yet, you want to petition someone about the situation, please direct your energies at Sun.


  • OS X Java Definitive Timeline shows the problem of letting Apple - a party for who Java is low-priority business - take care of delivering it on its platform: worst lag in release schedule was 21 months for Java 1.4 to show up in Mac OS X.

  • Also there, Comic: Apple’s Pathetic Java Support? Oh Really? saying
    Dear Steve,

    Writing your own JDK is really hard. Maybe you should follow Microsoft’s lead and let Sun do the dirty work?
    Well, yeah, if only Sun wanted to do it.

  • In Shipping means prioritizing Gruber also reinforces my point:
    Perl, Python, and Ruby pretty much compile out of the box on Mac OS X. Apple doesn’t have to do much at all — at least relative to Java — to include them on Mac OS X. Why? Because that’s how these tools are designed and engineered — they’re made to “just build” on any Unix-like OS. It’s not Apple’s responsibility that Java isn’t like that — it’s Sun’s.
    He's also quite confident we'll see Java 6 in Mac OS shipped soon, if the timeline above is any indication.

No comments: