Leopard, Java, and Open Source

I haven’t gotten around to upgrading to Leopard yet for several reasons, probably the most prominent of which is that Lightroom doesn’t work correctly, and I’m starting to use it a lot (more on that in a later post, perhaps). But it’s not for lack of Java 6. I’ve been following the Java on Leopard thing with bemusement, but John Gruber’s most recent post sparked a few thoughts.

Since I haven’t posted in a while, let me remind you of the context. For a while I was a Java developer, but that was another life ago, and since then, I’ve been a Python developer, and am now a manager of Java (and Javascript) developers. I’d agree with John that Java is not directly important to the Mac. No important piece of Mac software that I am aware of is written in Java, and the only important (unless you count Azureus, which Mac folks would not) client side Java apps are Java IDE’s or custom corporate applications. So it is hard to make a compelling argument that a late Java is directly bad for Macintosh sales, which Apple is surely focused on.

Nonetheless, I do think that Java, and all those Java developers (who many in the Mac community look down their nose at) are important. Their pushing for Titanium Powerbooks and MacBook Pros helped (in a lot of situations that I am directly familiar with) to improve Apple’s credibility in development shops, which helped Apple get to where it is today. I might still be using Windows if I hadn’t gone to ApacheCon 4-5 years ago and started to see the Mac’s, which were being used by my Java developing friends.

Gruber says that Java is not made to “just build” on any Unix-like OS:

Several irritated Java developers suggested that I’d feel differently if it were a developer runtime that I personally cared about — that I’d be irate if, say, Perl or Ruby or Python were dropped or degraded in Leopard. But that’s not a good comparison; 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.

Actually, I don’t think that he is correct here. When I worked at Apple, one of the projects that I worked on was a port of Java 2 to run atop the Newton operating system. I personally wrote the driver code for networking and the file system, and I can tell you from first hand experience, that Java definitely builds fine on Unix like operating systems. That’s not the problem. The problem is where OS X is not a Unix like operating system.
The places where there seem to be problems are the places where Java needs to talk to Carbon to do all that client side GUI Java stuff. I don’t think that you can claim that Carbon is part of “any Unix-like OS”.

I do think that there is something important buried in the quote from Gruber’s post. Look at the difference between the runtimes that got “kept” in Leopard. Perl, Python, and Ruby (Let’s leave aside for a moment the sad truth that hardcore Python and Ruby developers end up installing their own local runtimes). Not only were these runtimes bundled, but 2 of the 3 were actually improved – things like bridges to Cocoa, DTrace probes, and so on. What’s a critical difference between these runtimes and Java? How did all these improvements happen? Many of them were done by people outside of Apple, on a schedule that was not Apple’s, but which coincided with Apple’s. The Ruby DTrace probes were done by Joyent, the Python Objective-C bridge was done by people outside Apple. Apple pretty much just had to pick up the changes that were made. How did this happen? Those runtimes are open source, as were all the improvements that I just mentioned.

A few years ago at JavaOne, Sun took a poll of Java developers to see if open sourcing Java was important to them. If I remember right, about half those developers said no. From where I sit, it looks like an open source Java would have contributed substantially to having Java 6 ready to go for Leopard. Today, Sun has opened up the source code for Java, but a version of Java based on that opened codebase has yet to arrive. Maybe open source Java really is important after all. I guess we’ll have to wait for OS 10.6 and Java 7 to find out.

38 Responses to “Leopard, Java, and Open Source”


  • Hi :-)

    Just a question from someone who just sometimes writes something in Java (so I’m on the outside of this whole discussion): Is there any chance at all that should such an opensource’d release of J2SE appear, that simply a 3rd party like Apache does the MacOSX integration?

  • Maybe. I noticed a certain lack of ‘hey ho, let’s go’ spirit among the majority of heated comments on the topic. It seems to me that many people would be content if Apple (or Sun) simply shipped a proprietary Java 6 runtime for OS X tomorrow.

    And there is the fundamental problem of being dependent on a proprietary piece of software for one’s business. :)

    Economically speaking, since Apple does not sell its JDK port, and doesn’t appear to be betting its house on it, it would make sense for them to merge forces with Sun inside OpenJDK, and make sure that the next version of Java released by Apple is free software, like most other runtimes they ship with OS X.

  • The Perl ObjC bridge was slated to go in as well but the outside developer dropped the ball.

    I blame Apple only in that they have been silent.

  • Dalibor, why wait for Apple? The OpenJDK community should be fixing this problem, shouldn’t they? Whether Apple should become part of the OpenJDK community is a separate issue. And whether Apple could reship an OpenJDK-built runtime in OS X is yet again another issue.

  • a couple of questions/factors:
    - is there something in J6 that makes i harder to reuse the existing AWT and threading libraries already ported with J5?
    - could it be that server-side deployment is more important to them (and to most Java devs) so that J6 could slip with less impact?

    obviously it would be nice to have a definitive statement from apple.
    i agree that it would make sense to open-source the underlying implementation – we can see the JDK internals on every other major platform already.

  • There is no need to wait for Apple, if one desperately needs Java 6. It’s a qemu instance with Ubuntu away (and so is the 100% free software IcedTea) ;)

    As far as porting OpenJDK to darwin goes, no one proposed it on the discuss list yet, afaict, or posted any patched there to do it. There were one or two external efforts that didn’t get very far, so I assume that the bootstrapping is non-trivial to acomplish.

    One potential way to get it done would be to use an existing OpenJDK hybrid that works on darwin (Cacao, or IKVM) for bootstrapping purposes, and to go from there. But I’m not aware of anyone seriously working on that (and fwiw, darwin patches are rare in general for Kaffe and other free VMs, too).

    But I’d be happy to discuss this on the mailing list!

  • “Java definitely builds fine on Unix like operating systems. ”

    Dunno… i have here compiled from source:
    python, ruby, perl and mono

    I must tell you, I dont even know where to look for the java source…. I also dont care anymore, for me java is dead, but you see with ruby, python and mono, getting it to compile was easy, and with perl it was easy too once figuring out that perl used a slightly different make way with that -DUSE crap….

    If Java wants to survive, it needs to cater to the casual “poweruser” as well. But I for one do no longer give a damn, all the “script tasks” I do with Ruby, the rest I chose for what gives me the least headache (to be fair… everything gives me a headache here and there)

  • Luis Alejandro Masanti

    quote:
    “- is there something in J6 that makes i harder to reuse the existing AWT and threading libraries already ported with J5?”

    As far as cited by John Siracusa Ars’ review of Leopard, Apple is abandoning Carbon’s upgrade to 64 bits.
    So –maybe–, if the existing AWT is based in 32 Carbon, they could be going an upgrade to 64 Cocoa… and this should be a huge effort. But I do not know nothing for sure.

  • Steve Jobs Hates Us

    I’m upset about this because it’s another point of data signifying a disturbing trend: Apple no longer believes that it has to treat its customers with respect or even honesty. Were we wrong to believe Steve Jobs when he got up on stage at WWDC and told us all that the Mac would be the best platform for Java developers? In hindsight, yes, it should have been obvious that Jobs had no intention of supporting Java or any other language that would seriously compete with Objc/Cocoa. Jobs doesn’t share, you either use what he gives you or you GTFO.

  • I think Steve was genuine in his assertion that the Mac would be the best platform to develop Java on. But times change and Apple must adapt even if it means reversing earlier statements. As has been pointed out, there are no applications of importance on the Mac written in Java. Why spend engineering time and money rushing to get it out if it has a low impact? The belief that Java could ever “seriously compete with Objc/Cocoa” is a dream. No matter what, Java cannot compete against a language native to the system for anything but niche applications. It won’t have access to the best technologies on the platform and user’s will be able to tell, most of the time, that it just doesn’t feel right.

  • Just a note: since 1.4, AWT runs on Cocoa (and can do a number of nifty tricks, such as hosting a NSView inside an AWT/Swing hierarchy). It was the one big change from 1.3 AWT.

  • I noted the same thing in my post on the topic. Apple distributing open source development tools is great, but it would be really great if Apple would just release their AWT peers and Aqua LAF to the OpenJDK project. I suspect Java support on Mac would get a lot better fast.

  • One thing that does run on Java is WebObjects, and Apple Store and ITMS both run on WebObjects. Unless Apple’s decided to resurrect the objc version of WebObjects in the near future (or less likely — switch the stores to RoR), they’ll need to ship working JVMs.

  • “there are no applications of importance on the Mac written in Java.”

    And what exactly are the applications of importance on the Mac written in Ruby?

  • I happen to work in a Java shop and all the Windows and Linux people have upgraded and are building against Java 6. I can’t.

    So as a Mac user I am annoyed, I feel a second class citizen again! I can run Windows or Linux on Parallels and install Java 6 but the interface is obviously sub-optimal.

    And just as annoying is Leopard is a Unix system and now POSIX compliant yet I can’t use the latest version. Frankly it is nuts!

    For too long Macs were out on a limb, now they are an equal, if not superior system but not in this one area, which if you don’t use Java may not be a problem but if you do use Java then it is a massive problem.

  • While no one argues about what apps of importance exist for OS X, there are a large number of developers (I’m one anyway) that prefer the Mac for development. And, since it’s so great, we tell our friends and end up growing the Mac user base. Ergo, if Java support sucks, and we end up using Ubuntu, we won’t be evangelizing the Mac nearly as much. And that *does* hurt Apple’s bottom line. There are still a ton of Java developers (server, embedded, enterprise apps); promises of Java support and then to not deliver a functioning current version of the JDK, is just going to push us towards other platforms.

  • What disturbed me with Gruber’s remark was the idea that upset Java developers was somehow not important. I know it has nothing to do with world peace, but come on. On a geek mac blog, why would an upset java developer be any less important in the mac universe than a disgrunted photographer?
    I dramatized this in my mail to him (politely, I think), but imo there is a strange attitude among mac using coders, with fashion and cool-factor sometimes being more important than the fun of building something in just about anything.

  • “No important piece of Mac software that I am aware of is written in Java”

    Gruber points this out too, and while it’s true, I think it’s a straw man. Clearly no *users* are complaining about apps that are broken by the absence of 1.6, because there are no such apps. My sense is that the complainers are mostly Java *developers* who prefer to develop on the Mac and who need 1.6 to work on projects that will be deployed on some other platform. I am such a developer, so I may be projecting; but that is my sense.

    For me, the 1.6 omission is a minor inconvenience in the grand scheme of things. I don’t see it as part of some more sinister story like Apple trying to kill Java. I see it as a case of needless irritation caused by failure or refusal to communicate. For me, a simple “We had to remove some things; please bear with us” would have gone a long way.

  • There aren’t any important apps for the Mac written in Ruby, but Apple didn’t really have to expend any effort to get Ruby support going either. If it was a herculean engineering task I’m sure it’d be left to a future update same as Java 6. It would be nice if Apple would give away their existing Java tools to the OSS community Sun’s trying to build, but who knows what their licensing agreement with Sun for Javas 5 and earlier even allows them to do with that code? Seriously someone with more insight is welcome to spell it out. Frankly until Apple makes an official statement this all seems a little like doomsday-ish exaggeration to me. Also, anyone care to weigh in on http://www.symphonious.net/2007/10/31/java-5-on-leopard/ ?

  • Guys, QUIT COMPARING JAVA TO OBJ-C. Run a webserver in Obj-C and THEN make a point.

  • Rather than being ‘buried’ in Gruber’s quote, your point about other runtimes being ready to be picked up by Apple was exactly the main thrust of his argument, which you’ve just parrotted here, rather than adding anything (at least in the section where you deal with Gruber). Python ‘just builds’ as in no work from Apple is required to make it build. Java, on the other hand, waits on a big development effort from Apple, every time. Gruber wasn’t talking about the end developer’s effort being saved — he was talking about Apple’s.

  • People just don’t seem to be able to understand that Java apps on the Mac and the importance of Java are not related.

    As long as Windows continues to totally dominate the enterprise desktop, Java is the only way that a developer can write enterprise desktop apps on a Mac. Just try and prove me wrong.

    It’s that simple.

  • As far as cited by John Siracusa Ars’ review of Leopard, Apple is abandoning Carbon’s upgrade to 64 bits.

    So –maybe–, if the existing AWT is based in 32 Carbon, they could be going an upgrade to 64 Cocoa… and this should be a huge effort. But I do not know nothing for sure.

    AWT on Mac OS X was originally Carbon-based, but Apple switched to Cocoa a few years ago. But I imagine upgrading it to work with 64 bit will be a pain, not to mention all the other work they have to do. (fixing bugs… oh so many bugs, and of course adding all the Java 6 stuff.)

  • “On a geek mac blog, why would an upset java developer be any less important in the mac universe than a disgrunted photographer?”

    “I haven’t gotten around to upgrading to Leopard yet for several reasons, probably the most prominent of which is that Lightroom doesn’t work correctly, and I’m starting to use it a lot”

    Clearly a disgruntled java developer isn’t less important. But a disgruntled java developer isn’t MORE important either. I don’t see anyone declaring that Adobe has abandoned photographers because Lightroom doesn’t work on OS X on day 1. Sure, Java JDK is Apple’s animal to ship, but Apple has a long history of shipping JDKs independently of OS.

    The issue isn’t that Java devs don’t count. The issue is that some Java devs want to play the role of dramatic victim here by declaring with all possible shrillness that Apple doesn’t love them.

    Gruber’s point remains. Get over yourselves. Recognize that the language/framework/operating system that Sun has put forward is harder to integrate in the spirit that it was intended than almost anything else out there and simply wait for the JDK to ship.

  • Java may be the best (or only) way to write enterprise apps for the Mac but this java thing is simply another example that Apple doesn’t care about enterprise. It isn’t a market they have much presence in and because it is mostly about price (cheap) it isn’t one they want to be in.
    This relegates Java to a ‘nice to have’ and I’m not surprised it isn’t in 10.5.0

  • Welcome Daring Fireballers!

    The main point of my post was not about whether Java is important on the Mac (although I think it is, just not as important as some are making it out to be).

    I’ve been involved in talking to lots of parties about open sourcing software, and the situation with the JDK on Leopard is a perfect example of why people should care that platform/runtime software be open source.

  • My pennies worth. The Ruby & Python GUI implementations sit on top of Cocoa via the bridge.

    The Java runtime, on the other hand, is a peer to Cocoa in the OS X architecture – i.e. it sits directly on top of Quartz. (Although Millenomi’s comment suggests differently – that AWT sits on top of Cocoa?).

    There are probably a number of sound architectural reasons for this (performance is probably the main one).

    The Ars Technica review implies that quite a lot has gone on in terms of changing the way the native widgets are constructed in OS X. Now I’ve no idea what layer that’s been implemented – if in Quartz, then the impact should be minimal, but if in Cocoa then presumably that work needed duplicating in Java – both 5 and 6.

    It’s this that makes implementing open source Java on OS X a pain. Perhaps if there was a strong focus on something like the native GTK port, with backing from people with a serious investment in Java desktop applications – i.e. the Eclipse Foundation.

    Splitting out a server side only Java 6 may sound like a solution (you could run Java 6 web apps which is the important use case) BUT I guess there would be difficulties using an IDE to debug.

    Although all we actually want is a simple statement – ‘it is coming as soon as it passes QA’. We can handle late, what we can’t handle is being late and not telling your customers (imagine if most of us in the development trade did that? Well, people buying Apple machines to develop third party software ARE customers).

    It’s the iPhone SDK story all over again – a vacuum of information leading to PR-damaging speculation.
    (Do you really need an NDA on an already published language??)

  • The gnashing of teeth is really premature. Java is coming to Leopard. It is announced. Obliquely, but announced.

    http://developer.apple.com/tools/webobjects/index.html

    WebObjects 5.4 for Leopard is the newest release, adding many enhancements including improved support for rich Web applications and enhanced integration with the ANT build system. WebObjects is included as part of the Xcode installation, and the Java JDK is installed with Mac OS X, making it easy for any Mac user to begin developing. Leopard Server installs the WebObjects runtime by default, providing a great foundation on which to deploy your applications.

    WebObjects is written in Java. How will they ship 5.4 without a working stack on Leopard? They can’t. Stay tuned – this is a non-issue. Expect Java for Leopard within about 6 months (the usual WebObjects lag behind everything else).

  • How hard would it be to have a port of a Linux like Java implementation that uses X11 on OSX?

  • There aren’t any important apps for the Mac written in Ruby…

    Isn’t TextMate, arguably the most popular text editor for the Mac, partially written with Ruby?

  • In the corporate world, most Java apps are server-side apps that appear to users as web apps.

    In my work, the vast majority of servers these apps are deployed on run Unix or Linux. But, due to the nature of Java (as well as many other languages), you can develop Java on most any desktop platform, such as Windows. Most companies provide Windows boxes for all their developers.

    Many of us, though, find the Mac more productive. I can develop the same Java apps on my Mac as I could on Windows (or Linux). I can therefore introduce Macintosh computers into a previously all-Windows environment. That’s the win for Apple.

    For me, the main issue is not that Apple isn’t shipping Java 6. The issue is that Apple isn’t telling me any idea of when it will, or even whether it will. A statement from Apple as simple as “planned for Q3 2008″ would be more than sufficient.

  • TextMate is ObjC… It’s used for ruby dev… although NetBeans 6 looks pretty good as well.

    The key hard part of doing an OSS port of java to OSX is the GUI stuff. X11 only would be a disaster from a UI point of view… I’d rather wait a year or so for j6 that uses aqua than get it right away with x11.

    This is the big difference with ruby/python. They don’t have GUI’s as part of their platform so of course they are a quick recompile.

  • Mebbe I’m WAAAAY over my head here. But what’s the likelihood that Apple is trying to put the LLVM technology inside the Java SDK / JVM ? That might take a bit more effort than a simple recompile of public sources, but turn the Mac into a premier tool for Java.

  • One thing that seems slightly ignored was the fact that Java did rely on Carbon before and with Leopard Carbon is seriously deprecated – and was only deprecated recently (like the killing of 64-bit Carbon).

    It need work. And, to be honest, Sun should be helping out here. It’s not just on Apple’s door.

  • This problem is like Apache on Tiger, that was hard to upgrade by myself in Apache2 and Php5 without Mamp for increase my php codes but most small business are still on old fedora, apache 1.3 and tomcat.
    But i think the Java 6 is a real probleme for Hi-Level developers but when it will run on Mac, it’s will work, as a mac…
    I prefer wait than switching on windows, linux is great for java, but if i want java6, i use Solaris, RedHat…
    Well, Java 6 isn’t it experimental? Is there so much apps in J6?
    Most services runs on Java 1.4 or 1.5, Java2 v6 is great but it’s like Perl 5.8.8 or python 2.5, market is not so geek has we think (i work in france so i know what i’m talking about, i see so much php3 and VB6 at office that i feel like in middle age).
    Sun is in case too, apple is not inventor of java and Sun dosen’t seams to make any effort to offer mac tools (do they feel concurency?) because as mac is bsd based, comparaison to unix is quite easy.
    Why Sun spend time to develop for Windows and not for Mac? it tkae for effort and time i think furthemore, most windows coders are using VB, WinDev (that olso seams to ignore unix) and C++ and makes web apps in C# till they taste .net (shame).
    So

  • Don’t forget Aquataxx is written in Cocoa Java and comes with complete source code. It was completely natural and fun writing this game in Java with Cocoa, and now I sit with the Objective-C 2.0 documentation in front of me, shaking my head. Objective-C is wonderful. I realize this. It’s just not the same. I see Java as a step down from the craziness of C++ with pretty much the same familiar syntax, and I see Objective-C as a language that is a little too platform-specific. If Apple were to port Cocoa to Windows (like they haven’t already), this would be a big win-win. I’d take a job in Cupertino working on the Java bridge if necessary, but probably lack the requisite knowledge and experience. I hope Apple reconsiders. Ruby looks like a (neat) scripting language; these are not the same concepts here.

  • Tim, dave and Mj all hit the target: Java is harder to maintain because of gui issues.

    The other languages mentioned generally punt on that, which is why we still have silly (but useful) stuff like Tk bundled with python.

    That said, I was pleased that the python that comes with OSX 10.5 includes a more recent wxPython library.

  • Agree 100% that the lack of Java on OS X is directly related to the fact that J2SE and the JVM are not (were not) open source. While it wouldn’t immediately solve the Java 6 issue, I wish Apache Harmony ran on OS X. At the moment, I don’t have any time do to anything other than wish.

Leave a Reply