I’m late to the party blogging about Apple deprecating its Java for Mac OS X, with particularly good posts up from Matt Drance and Lachlan O’Dea. And I’ve already posted a lot of counterpoints on the Java Posse’s Google group (see here, here, and here). So let me lead with the latest: there’s now a petition calling on Apple to contribute its Mac Java sources to OpenJDK. This won’t work, for at least four reasons I can think of:

  • Petitions never work.
  • Apple doesn’t listen.
  • Apple is a commercial licensee of Java. The terms in their contract with Sun/Oracle almost certainly prohibit open-sourcing their Sun-derived code.
  • Even if it could be open-sourced, Apple’s code was developed for years with the assumption it was proprietary code. The company would want nothing less than an absolutely forensic code analysis to ensure there are no loopholes, stray imports or links, or anything else that a creative FSF lawyer could use to claim that Mac OS X links against the GPL’ed OpenJDK and must therefore itself be GPL’ed. Apple has nothing to earn and everything to lose by open-sourcing its JDK, so don’t hold your breath.

It’s also frustratingly typical that many of the signatories of this petition have spent the last week blogging, tweeting, podcasting, and posting that they will never buy another Apple product (and they’re gonna go tell all their friends and relations that Apple sucks now, just for good measure). Here’s the thing: companies generally try to do right by their customers. When you assert that you will never be their customer again, you remove any reason the company would have to listen to your opinion. Really, this much should be common sense, right?

Buried in all the denunciations of “control freak Steve Jobs” and his nefarious skullduggery is a wake-up call that Oracle and the Java community need to hear: one of your biggest commercial licensees, the second biggest US corporation by market cap, doesn’t think licensing Java will help them sell computers anymore. Why does nobody take this screamingly obvious hint?

I imagine part of the reason that the activists want Apple to contribute its code instead of letting it go to waste is that they’ve realized what a tall order it would be for the community to attempt a port on its own. Java is huge, and its native dependencies are terribly intractable: even the vaunted Linux community couldn’t get Blackdown Java up to snuff, and Sun came to the rescue with an official version for Linux. How likely is it that we’ll find enough people who know Java and Mac programming well enough — and who care to contribute their time — to do all this work for free? It may well be a non-starter. Landon Fuller got the headless bits of JDK 6 ported to OS X ported in a few weeks in the form of the Soy Latte project, but had to settle for an X11-based UI, and his announcement asked for help with Core Audio sound support and OS X integration in general… and I don’t believe any help ever materialized.

Aside: when volunteers aren’t enough, the next step is to get out the checkbook and call in mercenaries. I looked at javax.sound yesterday and estimated it would take me 4-6 weeks, full-time, to do a production-quailty port using Core Audio. I’ll bid the project out at $20,000. Sign a contract and I’ll contribute the sources to any project you like (OpenJDK, Harmony, whatever). You know where to reach me. And I’m not holding my breath.

The real problem with porting Java is that Java’s desktop packages – AWT, Swing, javax.sound, etc. – are very much a white elephant, one which perfectly fits Wikipedia’s definition:

A white elephant is an idiom for a valuable possession of which its owner cannot dispose and whose cost (particularly cost of upkeep) is out of proportion to its usefulness or worth.

As I’ve established, Java’s desktop packages are egregiously expensive. In fact, with Apple’s exit, it’s not clear that there’s anybody other than Oracle delivering a non-X11 AWT/Swing implementation for any platform: it’s just too much cost and not enough value. End-user Desktop Java applications are rare and get rarer every day, displaced largely by browser-based webapps, but also by Flash and native apps.

We know the big use for AWT and Swing, and it’s a terrible irony: measured by app launches or time spent in an app, the top AWT/Swing apps are surely NetBeans and IntelliJ, IDEs used for creating… other Java applications! The same can be said of the SWT toolkit, which powers the Eclipse IDE and not much else. This is what makes this white elephant so difficult to dispose of: all the value of modern-day Java is writing for the server, but nearly all the Java developers are using the desktop stuff to do so, making them the target market (and really the only market) for Desktop Java. If there were other viable Java applications on the desktop, used by everyday end-users, Apple couldn’t afford to risk going without Java. There aren’t, and it can.

There’s lots of blame to go around, not the least of which should be directed at Sun for abandoning desktop Java right after Swing 1.0 came out. It’s embarrassing that my five-year-old Swing book is more up-to-date with its technology than my year-old-iPhone book is, but it illustrates the fact that Apple has continued to evolve iOS, while Sun punted on client-side Java for years, and then compounded the problem by pushing aside the few remaining Swing developers in favor of the hare-brained JavaFX fiasco. Small wonder that nearly all the prominent desktop Java people I know are now at Google, working on Android.

Other languages are easier to port and maintain because Ruby, Python, and the like don’t try to port their own entire desktop API with them from platform to platform. Again, the irony is that this stuff is so expensive in Java, and little related to the server-side work where Java provides nearly all of its value. I’m not the first to say it, but Oracle would do itself a huge favor by finding a way to decouple all this stuff from the parts of Java that actually get used, likely as a result of Project Jigsaw. Imagine something like this:

Splitting desktop stuff out of Java SE

In this hypothetical arrangement, the desktop packages are migrated out of Java SE, which now contains the baseline contents of Java that everybody uses: collections, I/O, language utilities, etc. These are the parts that EE actually uses, and that dependency stays in place. I’ve colored those boxes green to indicate that they don’t require native widgets to be coded. What does require that is the new Java “Desktop Edition” (“Java DE”), which is SE plus AWT, Swing, Java2D, javax.sound, etc. For the rare case where you need UI stuff on the server, like image manipulation as a web service, combine EE and DE to create “Java OE”, the “Omnibus edition”. Also hanging off SE are ME (which is SE minus some features, and with a new micro UI), as well as non-Sun/Oracle products that derive from SE today, such as Eclipse’s quasi-platform, and Android. Of course, it’s easy to play armchair architect: the devil is in the details, and Mark Reinhold mentioned on Java Posse 325 that there are some grievously difficult dependencies created by the unfortunate java.beans package. Still, when the cost of the desktop packages is so high, and their value so low, they almost certainly need to be moved off the critical path of Java’s evolution somehow. The most important thing Oracle needs to provide in Java 7 or 8 is an exit strategy from desktop Java.

Instead, we’ll continue to hear about what an utter rat-bastard Steve Jobs is, and how the deprecation of Apple’s Java is part of a scheme to “force developers to use Objective-C”, as if there were a flood of useful and popular Java applications being shoved off the Mac platform. Many of the ranters insist on dredging up Jobs’ vow to “make the Mac the best Java platform”, in determined ignorance of the fact that this statement was made over ten years ago, at JavaOne 2000. For context: when Jobs was on the JavaOne stage, the US President was Bill Clinton, and Sun was #150 on the Fortune 500, ahead of Oracle and Apple (and Google, which didn’t even enter the list until 2005). If TV’s Teen Titans taught us anything, it’s that Things Change.

And for a while, maybe the Mac was briefly the best Java platform: unlike Windows (legally enjoined from shipping Java by their attempts to subvert it) and Linux (where many distros turned up their noses at un-free Java for years), Apple shipped Java as a core part of the OS for years. Not an option: it was installed as part of the system and could not practically be removed. Apple’s Mac look-and-feel for Swing was also widely praised. Do you know who said the following?

I use the MAC because it’s a great platform. One of the nice things about developing in Java on the Mac is that you get to develop on a lovely machine, but you don’t cut yourself off from deploying on other platforms. It’s a fast and easy platform to develop on. Rock solid. I never reboot my machine… Really! Opening and closing the lid on a Powerbook actually works. The machine is up and running instantly when you open it up. No viruses. Great UI. All the Java tools work here: NetBeans and JEdit are the ones I use most. I tend to think of OSX and Linux with QA and Taste.

It was Java creator James Gosling, in a 2003 blog entry. As you might imagine, Apple dumping Java seven years later has him singing a different tune.

A lot of us who’ve developed Java on the Mac have expected this for years, and this week’s reactions are all a lot of sound and fury, signifying nothing. The Java crowd will keep doing what it does — making web sites — but they’ll have to make a choice: either use Windows or Linux for development, or get away from the IDEs and write their code with plain text editors and the command line on the Mac. If I were still doing Java, I probably would barely notice, as I wrote nearly all my Java code with emacs after about 2000 or so, and never got hooked on NetBeans or Eclipse. But with the most appealing desktops and the most popular mobile devices ditching Java, it’s time for the Java community to face up to the fact that Desktop Java is a ruinously expensive legacy that they need to do something about.

All the angry screeds against Steve Jobs won’t change the fact that this is the “ball and chain” that’s pulling Java below the waves.

31 Comments

  • 1. cadamson replies at 25th October 2010 um 10:55 am :

    Forgot to mention… the diagram is my first project created with OmniGraffle for iPad. The third time I found myself wanting it, I finally caved on the steep price.

  • 2. cadamson replies at 25th October 2010 um 11:44 am :

    Cooper doesn’t entirely agree with me, and thinks Apple is kicking any serious web development off the Mac.

  • 3. Tim O'Brien replies at 25th October 2010 um 12:42 pm :

    Here here! Dump the desktop from the distro. It is insane that my server-side applications and my DocBook rendering pipeline needs to cart around Java Sound APIs.

    Also, I do think Apple is trying to convince more developers to adopt Objective-C, but why the negative reaction. Xcode 4 is brilliant when compared to Eclipse, Objective-C and the constellation of APIs are well thought out and not subject to the politics of ineffective structures like the JCP.

  • 4. google.com/profiles/fs… replies at 25th October 2010 um 1:26 pm :

    Eclipse works on the Mac with OpenJDK today: http://njbartlett.name/2010/10/24/eclipse-soylatte-no-x11.html

    To me it seems it all doesn’t look quite as bad for the “other crap” :-)

  • 5. Apple und Java | Niklas D&hellip replies at 25th October 2010 um 2:45 pm :

    [...] Hier ist der beste Blogbeitrag, den ich zu diesem Thema bisher gefunden habe – Swing würde ich auch nicht noch mal portieren wollen :-) · · · ◊ ◊ ◊ · · · Leave a Reply Click here to cancel reply. [...]

  • 6. Mac, Java and how to shoo&hellip replies at 25th October 2010 um 4:37 pm :

    [...] read I found on the topic explains why “Desktop Java is a ruinously expensive legacy„, thanks to Stefan Tilkov for the link. There are some really interesting thoughts here, I [...]

  • 7. Twitter Updates for 2010-&hellip replies at 25th October 2010 um 4:49 pm :

    [...] rant on Desktop Java / Java on MacOS by @invalidname – http://www.subfurther.com/blog/?p=1305 – A must read. [...]

  • 8. Create Digital Motion &ra&hellip replies at 25th October 2010 um 6:38 pm :

    [...] Must-read: Chris Adamson, one of the few developers with real experience with Java and multimedia, lays out just how bad the situation is with Java on the Mac: shoes[1].drop(); [...]

  • 9. Lachlan ODea replies at 25th October 2010 um 7:00 pm :

    I think you are absolutely right. Even worse, Oracle are now abandoning AWT/Swing in favour of SceneGraph/JavaFX (a great move, I think, but a few years too late). The prospect of starting a massive port of effectively dead-end technology, from scratch, isn’t going to be appealing to anyone.

    I think Oracle would prefer to split up Java like you suggest, and just do JavaFX on Mac and forget AWT. But while there’s only a tiny set of Swing applications that matter, there’s no JavaFX applications that matter, so that won’t make anyone happy. Bit of a mess all round, really.

  • 10. bobthedino replies at 25th October 2010 um 7:24 pm :

    It’s funny, or maybe even ironic, that one of the best-looking desktop Mac Java apps is the Final Cut Server Client, as sold by Apple, Inc.

  • 11. google.com/profiles/st… replies at 25th October 2010 um 11:36 pm :

    Chris, thanks for such a well thought out post!

    It’s a pity that Jigsaw (along with lambdas) is unlikely to be released until JDK8 in late 2012. The strategy write-once/run-anywhere really worked for Sun and Java for quite a while. I suppose that was ok for a while. I do feel that Microsoft was able to revisit many of those kinds of decisions when it envisioned it’s new platform. One idea with the CLR/CLI is that it exposes the underlying platform rather than having a problem with lowest common denominator. It’s all a trade off. Unfortunately .NET has been (and may still be – you have to ask lawyers!) a platform with much less freedom.

    Java seems to have lost it’s shininess to the point where the sentiment seems to have breached the tipping point. There’s a lot of negativity! I’ve even drummed some up myself :). Much of that’s about the language though. I hope the JVM will remain the open platform it has been as an alternative to .NET – for a while at least! Other alternatives are fun and interesting but not nearly as mature yet.

  • 12. bjorn replies at 25th October 2010 um 11:53 pm :

    JavaFX, “hare-brained JavaFX fiasco”? LoL, yes!

    I think your observations are correct. It’s important to remember that very little of the time Oracle invests in Java is actually writing code, and even less of that is spent adding new features. Backwards compatibility and administration is a huge amount of work. This makes me think they are going to keep swing around for a long time. I think that’s why they wanted a new UI toolkit: they could start from scratch. To really fix swing it kinda needs a rewrite. I have my own framework I’ve written on top of swing that I use. Planning for the future is tricky at this point.

  • 13. pavon.myopenid.com/ replies at 26th October 2010 um 12:13 am :

    I agree that most java development is done on the server, and that removing the desktop components could be useful on some OS that was predominately used as a server. However, I don’t see how any of that relates to OS X.

    OS X doesn’t have much of any server market share due to the fact that Apple doesn’t cater to the enterprise market. Its primary value is in the desktop, so there is little use in having a java stack on OS X that doesn’t include good UI integration.

  • 14. Some thoughts on Java, OS&hellip replies at 26th October 2010 um 5:01 am :

    [...] very interesting piece to read is shoes[1].drop(); – basically saying, stop whining, the Java-on-desktop API model was flawed anyway and [...]

  • 15. peterkirn replies at 26th October 2010 um 9:23 am :

    I generally agree with your prognosis here, Chris, but I would question a couple of things.

    First, presuming you don’t rely on heavyweight legacy UI crap, there’s no reason you can’t use OpenJDK now on the Mac, as the Eclipse example above demonstrates.

    Second, port JavaSound? Really? JavaSound doesn’t even work right in Apple’s current implementation; it’s been broken for years. And for all the reasons above, I would assume you’d be the last person to want a big, heavyweight, hard-to-port implementation like JavaSound. Heck, I’d be perfectly pleased with something that was just a simple I/O callback that actually worked right. That’d still be a significant amount of work – you have to talk to all the independent APIs on the different platforms, Core Audio to ALSA – but not an insurmountable amount of work. (We’re getting you into Kickstarter territory, not $20 grand.)

    And anyway, isn’t some of the work on Tritonus in OpenJDK exactly that?

  • 16. How Apple is changing the&hellip replies at 26th October 2010 um 10:34 am :

    [...] might be happening with Apple’s support of Sun’s Java technology (read here and here for more details and commentary). Until now Apple has included an installation of Java in [...]

  • 17. Java is getting a eulogy &hellip replies at 26th October 2010 um 10:40 am :

    [...] about the move against their language and the reaction is pretty funny.  There is this article and this article, for example, that make the case for the move as it’s pretty obvious that Apple doesn’t [...]

  • 18. Java Is Under Siege. Will&hellip replies at 26th October 2010 um 1:01 pm :

    [...] fighting to stay relevant with the developer demographic. Chris Adamson, an industry consultant, believes Java’s disappearance from the Mac means very little, but removing the second-largest [...]

  • 19. Java Is Under Siege. Will&hellip replies at 26th October 2010 um 6:06 pm :

    [...] fighting to stay relevant with the developer demographic. Chris Adamson, an industry consultant, believes Java’s disappearance from the Mac means very little, but removing the second-largest [...]

  • 20. Lifestream Digest for Oct&hellip replies at 26th October 2010 um 6:55 pm :

    [...] Shared Chris Adamson on Java and Mac OS X. [...]

  • 21. Wil Shipley replies at 26th October 2010 um 8:13 pm :

    Ironically, OminGraffle was originally written in Mac Java, but we rewrote it in Objective-C.

    -Wil

  • 22. Last week ( recap ) &laqu&hellip replies at 26th October 2010 um 10:13 pm :

    [...] Apple, apparently was not done with news and decided to deprecate Java on Mac OSX. Community responded with expected WHAT THE FUCK STEVE ? But i tend to agree with this write up about whole deal. [...]

  • 23. Modulations » Java &hellip replies at 27th October 2010 um 2:02 am :

    [...] Chris Adamson: shoes[1].drop(); [...]

  • 24. Project Begets Love for A&hellip replies at 28th October 2010 um 3:34 am :

    [...] that Mac OS X would deprecate support for Java. This generated a lot of excellent discussion. My favorite post both described why this is a death knell for Java, while also outlining a strategy for ensuring [...]

  • 25. Windows is the dominant (&hellip replies at 29th October 2010 um 12:03 pm :

    [...] Stephen’s post goes on to show that Windows is the dominant OS across a number of developer spaces – only in Javascript was it not above 50% marketshare, and even there its a respectable 46.4% of the market, according to our logs. Why were Ian Skerrett, Eclipse marketing director, and I pondering the numbers? For the simple reason that Apple has announced it is going to deprecate Java in its operating systems going forward, thus neatly skewering the many Java developers that choose the Mac for flow and productivity reasons. Apple has obvious and simple business reasons for making the choice –  this is by far the best post on the subject. [...]

  • 26. cadamson replies at 12th November 2010 um 10:18 am :

    Update: Apple is contributing some, but not all, of their source to OpenJDK: Oracle and Apple Announce OpenJDK Project for OSX. The fact that they need to say that they’re contributing “the foundation for a new graphical client” makes me think that AWT/Swing/Java2D is not included… and that of course is the hard part (since pretty much everything else in Java SE was already ported by Landon Fuller’s soylate project, which has since been merged into OpenJDK’s bsd-port project.

  • 27. Michael Tsai - Blog - Com&hellip replies at 4th March 2011 um 4:52 pm :

    [...] (2010-10-25): Chris Adamson: As I’ve established, Java’s desktop packages are egregiously expensive. In fact, with [...]

  • 28. How Apple is changing the&hellip replies at 12th May 2011 um 11:45 am :

    [...] might be happening with Apple’s support of Sun’s Java technology (read here and here for more details and commentary). Until now Apple has included an installation of Java in [...]

  • 29. NSLog(@”Hello world&hellip replies at 17th July 2011 um 8:20 pm :

    [...] (even though MVC is followed in Swing, bad practices abound — this deserves a future blog post). This post all but convinced me it was time to move on to a platform that was constantly and lovingly updated: [...]

  • 30. Apple’s behaviour i&hellip replies at 3rd June 2012 um 8:45 am :

    [...] http://www.subfurther.com/blog/?p=1305 [...]

  • 31. Citazione: Chris Adamson &hellip replies at 25th November 2012 um 10:10 am :

    [...] Adamson, in un ottimo articolo sull’abbandono di Java da parte di Apple. Like this:LikeBe the first to like this. Published: [...]

Leave a comment

You must be logged in to post a comment.