Skip to content
Print

You Should Be Excited About Java on Mac

3
Dec
2007

I realize the very last thing I said about Java on the Mac was extremely negative, and I think that still holds.  Apple screwed up, big time.  What I’m talking about is a grass-roots effort to port Sun’s FreeBSD version of Java 6 over to MacOS X.  I’m talking about SoyLatte.

For those of you playing catch-up, SoyLatte was started by a bright guy named Landon Fuller with the expressed purpose of providing a Java 6 implementation for MacOS X 10.5 (Leopard).  It does this by availing itself of Mac’s BSD roots.  Because Darwin is basically a fork of the FreeBSD kernel, many BSD-based application can be easily ported to run in some form on MacOS X.  Sometimes all it takes is a recompilation linking against different libraries.  Obviously a full blown JVM is quite a bit more complicated than GNUChess, but the principle is the same.

The key phrase here is “run in some form”.  Mac applications are legendary for integration, sophistication and smoothness.  I have to admit that this reputation is well merited.  As a credit to Apple’s work on its (now outdated) JVM, this integration even extends to many applications written in Java.  Swing applications on Mac look native (because they’re using native Cocoa widgets, even more native than SWT’s Carbon implementation).  Java applications are also fully AppleScriptable, have access to core services like the application menu, services, file associations, the dock; the list just goes on and on.  This kind of tight integration is exactly what James Gosling was talking about when he said that Apple wanted to do the Java port on Mac themselves.  This kind of tight integration is very difficult for third-parties to accomplish.

Just to choose a comparatively trivial example, consider Swing (I did say comparatively).  Swing/AWT on Mac is peered by Cocoa and extremely performant, a trick that Sun failed to turn on Windows for half a dozen releases (partially succeeding in Java 6).  Swing/AWT on FreeBSD is backed by X11 and can be pseudo-peered using GTK+ widgets.  Now Apple does have a version of X11 bundled with MacOS X, and GTK applications do appear passably Mac-ish, but it’s still not the environment to which Mac users are accustomed.  Even solving this non-blocker issue will require thousands of man-hours and some really clever engineering.

But the point is: it’s happening.  There’s so much momentum behind this project it’s unbelievable.  LandonF is rapidly becoming the equivalent of a blogger household name (think “DHH”), and people are practically lining up to get in on the action.  Now I honestly don’t know how much contributor interest the project is seeing – there are quite a few hoops to jump through – but I know the attention from the community has been staggering.  It’s enough to make me want to buy a Mac just to help out.  :-)

What we’re seeing is virtually unprecedented.  The open-source community is taking a version of Java and independently porting it to another operating system.  Yes in the past we’ve seen projects like GNU Classpath and Harmony which have done clean-room Java implementations, but that’s a totally different problem.  Neither GNU Classpath or Harmony are JCK certified, which means that they’re technically not “Java”.  If Landon and company succeed in getting the FreeBSD Java 6 fully ported to Mac, they probably won’t face this issue.  Because it’s basically Sun’s implementation, and thanks to the new community control over the JCK certification process, SoyLatte could be the first third-party Java distribution to actually be “Java”.  This makes it a viable alternative for developers and (more importantly) big companies which are gun-shy on third-party ports.

So this is an incredibly exciting piece of work.  SoyLatte may be one of the most significant open-source projects in the last few years, and we’re seeing it unfold right before our eyes.  If you have a Mac and any extensive knowledge of Java, you should really consider helping out.  Here’s your chance to do something really significant for the future of Java on one of the most rapidly growing platforms on the market.  Those of us on the sidelines can only sit cheer, marveling and history in the making and admiring the power of the community.

Comments

  1. I would not call LandonF’s effort unprecedented — the Blackdown project did the same for Java and Linux.

    Neil Weber Tuesday, December 4, 2007 at 2:38 pm
  2. I certainly applaud this effort. SoyLatte is an impressive achievement, and I wish Landon much luck.

    However, it doesn’t completely solve the Java 6 on OS X problem. For Java desktop applications using Java 6 to be widely adopted by Mac users, we still need to see an official Java 6 release from Apple.

    It’s a great start, though. I see this more as a chance for application developers to get started writing OS X Java 6 apps so that once Apple gets off their asses and release it, there will be (hopefully) some good apps ready to go.

    Joe Attardi Tuesday, December 4, 2007 at 3:13 pm
  3. While I appreciate the work being done by Mr. Fuller, I hardly feel good about the Java situation on the Mac. While the SoyLatte project may be making progress, it has a long way to go (Swing apps running in XWindows as you mention) couple that with the fact that end users would have to download the JRE in addition to the application and the entire situation is that much more troubling. I still feel that the best solution for Java on the Mac is for Apple to get their JDK finished so that it is available on future updates of the OS. Perhaps SoyLatte will demonstrate to Apple that keeping pace with Sun’s Java is important.

    The one thing that does excite me is the prospect of having a Java 6 runtime that can run on OSX versions prior to leopard. This notion alone may be enough to keep interest in SoyLatte from faltering once Apple releases it’s JDK implementation.

    Rob Tuesday, December 4, 2007 at 3:23 pm
  4. I disagree with the two previous answers. On one hand it’s true that SoyLatte has a long way to go before it is usable in production for desktop applications since we need a smooth Cocoa integration – I bet Java 6 from Apple will come out first. But SoyLatte will probably give us a Java 7 delivered at the same time as the other platforms (i.e. January 2009) instead of waiting probably the mid of 2010 for an official Apple version (if ever it will see the light). If this will happen – and the fate of SoyLatte is entirely in the hands of the community – I don’t see why people should stick with Apple’s JDK – after all, we’re all using Sun’s JDK on Windows, not Microsoft’s. Smooth integration with Mac OS X can be implemented with no troubles with a stub, even able to parse the Info.plist of Apple’s JDK, and eventually capable to download and install on demand and once for all Soylatte from a web repository.

    Fabrizio Giudici Tuesday, December 4, 2007 at 3:49 pm
  5. People would stick with Apples implementation because it will be there. Why would they download another JRE when an implementation already exists?

    The idea of fragmentation is also troubling. I for one don’t look forward to supporting more than one JRE on the Mac. Unless an alternative becomes popular, I have no intention of doing so.

    What would be great is if Apple gets on board with Open JDK and stays in step with Sun’s releases.

    Rob Tuesday, December 4, 2007 at 4:02 pm
  6. Fragmentation shouldn’t be a problem as long as SoyLatte becomes JCK certified (and I see no reason why it wouldn’t once it becomes stable). You wouldn’t have to support Apple’s Java and SoyLatte separately, they should both fall under “Java”.

    Now, I’ll admit that in the area of UI (Swing implementation) and internal APIs, there’s probably going to be some significant differences. In this respect, I have to agree with you that the idea of supporting multiple VMs for a single, popular platform would drive me insane.

    Daniel Spiewak Tuesday, December 4, 2007 at 4:06 pm
  7. “Why would they download another JRE when an implementation already exists?”

    Oh, well, I suppose because it DOESN’T exist! :-) If Apple wasn’t the ball and chain for Java developers, always one year behind the normal schedule, SoyLatte wouldn’t be here and we’d be discussing about something else. Furthermore, with comparable features, many people would prefer OpenJDK over Apple’s JDK just because it’s open (sure, with Mac OS X there are not so many fans of FLOSS as with Linux, but there are some).

    Fabrizio Giudici Tuesday, December 4, 2007 at 4:11 pm
  8. Fabrizio,

    You’re making an assumption that Apple isn’t producing a Java 6 runtime. While they have certainly been silent on the topic, it is too soon to say they’re not going to release something in the near future. It’s true that I don’t know any more than you do, but the fact that there was at one time a pre-release version of Java 6 available means they at least have something somewhat close.

    As far as your assertions that people will prefer Open JDK to Apples implementation that is already installed on all new Macs, I find that highly unlikely. We have this problem right now on Windows and FOSS supporters fought long and hard to get Sun to amend their licensing terms so that the JDK could be bundled with Linux.

    I should also point out that no and I mean no FOSS Java runtime to date has been able to keep pace with Sun’s releases. When you look at how long it has taken the Classpath project to approach compliance with Java 5, Apples story looks much more appealing. A unified Open JDK with Sun’s code will go along way to correct this and I sincerely hope that Apple is on board so that releases come in a much more timely manner.

    Rob Tuesday, December 4, 2007 at 4:44 pm
  9. Rob, you’re misreading me :-) I’ve actually said “I bet Java 6 from Apple will come out first”.
    The point is that NOW Apple’s Java 6 doesn’t exist and this is not an assumption, but a fact. So, I assume that Apple will be late even for Java 7 and I’m sick and tired of being forced to wait for Apple low-priority agenda for what concerns Java.

    I agree with you on the failure of many FOSS Java implementations so far (but Harmony is another story), but OpenJDK is FOSS and by the time Java 7 is out it will be completely unencumbered. This means that by that time, the most used Java runtime in the computing world will be FOSS

    Fabrizio Giudici Tuesday, December 4, 2007 at 11:41 pm
  10. Landon’s effort is commendable. I would love to pay a small donation for the SoyLatte project.
    Let me know how I can send my donation to support this project.

    -Chandan Joarder

    Chadan Joarder Wednesday, December 5, 2007 at 12:28 am
  11. I think we have to consider two different audiences here that fractures the discussion. The first is the average desktop Mac user. Like a Windows user, they are not going to have to expect to download a JRE, they are going to go with what’s installed. That’s where the Java that Apple ships is important. The reality however, is that there are very few Java GUI applications on the Mac compared to the apps written in Objective C so this is a pretty small user base. I’m not saying it’s not important (and don’t what to start a war), but I can understand why Apple doesn’t keep this top priority with everything else they have going on.

    The second audience is those of use who develop in Java and love to use the Mac as our development environment. For us, the Mac is a development workstation for Java apps and not the final deployment. For us, this port of the JDK is excellent because it allows us to stay up to date while still continuing to develop on the Mac. The X11 issue is not as big a deal because 99% of Java apps are web and server based anyway, so they’ll run just fine on this port for development purposes because we’re going to deploy them to servers that aren’t running OSX (most likely) anyway. For use downloading another JDK is not that big a deal and I think this is a great port to help keep Java developers that prefer the Mac happily programming on it.

    sclough Wednesday, December 5, 2007 at 5:34 am
  12. LandonF is for sure the biggest rockstar in the Java world right now simply for not ranting about the situation, but stepping up and doing something about it.

    Magnificent achievement. He deserves all the time under the sunlight.

    Sakuraba Wednesday, December 5, 2007 at 5:40 am
  13. Java 5 (and even 1.4) is still standard on most enterprise applications, which are Java’s main market. Apple’s implementation of swing on top of cocoa made desktop Java apps run better on macs than any other OS, that’s in the most part what Java 6 addresses for other OSes.
    The porting effort is great, but Java’s well established, and I can’t think of any application that’s Java-6 only.
    There used to be an official “Java 6 Preview” from Apple which they took away, so there’ll probably release it soon. If anyone here has such a hurrying necessity for Java 6, please tell us why (I see no reason for that)

    guigouz Wednesday, December 5, 2007 at 6:16 pm
  14. Those who state things such as “I don’t see the reason to use Java 6.” or “1.5 is the standard” are seeing only their own land of Java use and development. Simply the amount of outcry on this issue should at least make those people sit back and think and maybe realize they’re only the center of their own universe :)

    My work _requires_ Java 6 and I do not have control over that requirement. The idea that it is reasonable for it to be over a year since the release of the latest version of Java and it is still not available for a quickly growing and popular segment of the desktop market is very bad for business (and I’m talking about Apple, not even myself!!).

    Just because you don’t see a pressing need for Java 6 on the Mac doesn’t mean there isn’t one. Everyone has different requirements and priorities, don’t belittle those that aren’t your own.

    Also, those talking about “needing to download another JRE”. Ummm, have you installed Windows or Linux lately? They don’t come with Java 6 pre-installed either (I haven’t touched Vista, so not sure there), so while it wouldn’t be typical for a Mac user, it IS the same for all platforms.

    It would be absolutely simple to create an installer for SoyLatte which placed symlinks (at least) in the right places for it to integrate fine with Apple’s method of supporting Java VMs. I’m sure an installer could manage creating the right symlinks so that things worked out. There might be a hiccup, but it sure isn’t rocket-science :)

    southc Monday, December 24, 2007 at 10:02 am
  15. So, SoyLatte is both a JRE and a JDK? Is there a package for just the JRE?

    Marcus Adams Tuesday, January 13, 2009 at 9:29 am

Post a Comment

Comments are automatically formatted. Markup are either stripped or will cause large blocks of text to be eaten, depending on the phase of the moon. Code snippets should be wrapped in <pre>...</pre> tags. Indentation within pre tags will be preserved, and most instances of "<" and ">" will work without a problem.

Please note that first-time commenters are moderated, so don't panic if your comment doesn't appear immediately.

*
*