It’s ironic to me that so many users of the superb, Java-based Processing multimedia tool seem to prefer the Mac, because Mac Java support seems downright anemic. Mac users have long complained that, since Apple develops their own Java support for Mac OS X, the platform tends to lag behind Sun’s releases. That to me doesn’t seem like such a problem — early adoption of each new Java to leap out of Sun is generally a bad idea anyway. A more significant issue, though, is that Java performance tends to lag on the Mac in multimedia apps and that Apple has dropped support for two of the most important multimedia APIs.

On the music side, Apple dumped its java package with 10.4.8. Result: not only do you lose all the features that make the Mac great for MIDI, like the IAC bus for inter-application MIDI routing, but your external devices also spontaneously disappear. Nice.

On the video side, QuickTime for Java has long been vaporware. Following an update for QuickTime 6.4 and Java 1.4, Apple seems to have abandoned the platform altogether. Note that again, the common theme is Mac OS X 10.4.x. Video sometimes works under QuickTime 7, but there are many potential issues. And each time Apple releases some new QT update, apparently in the interest of supporting the iTunes ecosystem rather than actual video production, stuff often breaks.

Maybe I’m missing something, and maybe I’m being overly harsh (there are platform-specific issues on Linux, Windows, and from Sun themselves), but I would like to learn more about how these issues can addressed to make the Mac a more robust Java multimedia development platform.

Shifting Priorities, and Long Live XP?

I could raise more serious questions about why Apple seems bent on redirecting its operating system efforts to benefit only Apple, in the form of more platform-specific APIs (all carefully leveraged by Apple-branded applications) and, in the case of QuickTime and even allocation of developer resources, tilted toward selling more consumer iPod, iTunes, and iPhone products rather than building the Mac. I don’t want to overstate that argument, though: Apple is a big company, and it behaves like one. Sun, for their part, have also left their own multimedia libraries like JMF without support. Multimedia just doesn’t seem to register on the radar screen of big companies, and since desktop Java development isn’t as important to Apple as pushing Xcode, Objective-C, and its own technologies, the decision is almost understandable.

The problem is, it leaves artists in the lurch. And, quite frankly, Windows is simply better. Java applications run faster. Java runtime support is better. Windows’ MIDI system — admittedly, perhaps thanks to a lack of updates there — works perfectly. You can wrap the DirectX video grabber and get terrific video performance, without using QuickTime. There’s a more robust Java development community, lots of tools, fantastic performance. If someone asked strictly on the basis of Java/Processing support, I’d have to admit Windows XP was my preferred platform. (Vista works fine with Java, despite some initial scares, but there are other issues that keep me away from Vista for now.)

Fixes and Alternatives

I’m not writing off the Mac. I hope Apple reconsiders its Java support. And in the meantime — as is often the case with Java on all platforms — third-party libraries step in. For the MIDI system:

mmj – Mac OS X universal binary java Midi subsystem: This seems to fix the major MIDI issues with Java, and provides support across Intel and PPC Macs. Installing is a drag-and-drop affair, and so far it seems to work without a hitch. It’s free, as well.

Mandolane makes some great tools for both MIDI and sound access (including 3D sound mixing), ranging from free to a paltry GBP5. Integrated support is coming free to Processing in the form of the excellent ProMIDI library.

Video is stickier. The only major alternative is Sun’s Java Media Framework (JMF). Good news: it’s fully cross-platform. Bad news: it has performance problems of its own, and Sun doesn’t seem to have touched it since 1317 2003. (Hey, what did happen in 2003, anyway? Sun and Apple were both fully supporting multimedia until then.) I’m hopeful that maybe open sourcing Java will make a difference, but there just aren’t that many people in multimedia with time to fix code. If only there were a big, brilliant tech company that could support such development, like — oh, yeah. Apple or Sun.

As I said, perhaps I’m missing something, as only an armchair observer. Are there other good libraries out there? Is there a solution in sight? Is there a good reason why Apple made these calls?

It’s also fair to note that Java isn’t the only game in town. The Mono Framework has a lot of the same benefits, with the promise of more robust support, though I’m unsure what its status is in regards to multimedia specifically. (I’m oversimplifying a bit here; Mono runs Java as well as C# — among other languages — but they’re at least distant cousins in concept and could be alternatives for specific projects.) For 3D programming, there’s also the Lua programming language, which is gaining popularity and will soon be officially support in Max/MSP/Jitter. Lua isn’t a big framework like Java, but … on the other hand, that’s the good thing about it, especially if you work it into a framework that provides multimedia.

I’d love to hear more feedback from people who know more than I do. That’s the one reason to shoot off your mouth like this. Instead of suffering silently, maybe someone can provide some insight.

In the meantime, with a little work, you can make everything work … or run XP on your MacBook, if you have to.

  • Sandeep

    Java on Mac is Dead. RIP. Especially for consumer applications. Why should apple go out of its way to support Java for Multimedia apps when there are better solutions out there. Is this a religious thing?

    Would I ever shell out any money to buy a Java app which does not fit the system L&F. Absolutely not!

    Java had its day in the sun and possibly for some specialty apps. But for the rest of us and esp for consumer level Multimedia apps Java is good as dead.

  • That's simply not factually correct. Java applications can — and many do — have a Mac look and feel. This is fully supported by the Mac JRE; in fact, it's *better* supported on Mac natively than on Windows. It supports Quartz, and it supports Aqua widgets if you want them. Using Swing, you can also plug-and-play look and feel on any platform you like.

    Java's not the right tool for every job. But I wonder what you mean when you say there are "better solutions" out there — solutions for what? That will depend entirely on the task. But that should be the developer's choice. As a higher-level language with cross-platform support — let alone talking about its unparalleled browser applet support — Java remains the most mature and deep choice for multimedia. It's anything BUT dead on Linux and Windows, not only on the server but on the desktop. If it's in fact dead on Mac, you have to wonder why.

  • Glenn

    Steve Jobs has been quoted words to the affect: "Nobody uses Java anymore." And, I've had a Apple technological evangelist tell me the same thing. Whether this is true or not, it seems to be something Apple wants people to believe.

    If I were at Apple working on the Java runtime, I would not be very motivated or thinking I was in a good place for advancement.

  • John Brave

    The question you should ask is 'Why should Apple support Java? Why doesn't Sun itself support Java on OS X?"

    If you think about it, Apple has absolutely nothing to gain by going to great length to support Java. If they do, then they're simply going out of their way to support another company's technology. OS X is the only platform (after December 24th, 2002) where the OS vendor builds support for Sun's Java.

    Since OS X is always at a disadvantage in the JVM space, nobody who relies on Java would rely on the Mac, no matter what Apple does. If you're a developer, you'll always rely on the official version released by Sun (as you should), and Sun releases Java for Windows and Linux. So logically, as a developer, you'd use Windows or Linux and develop against the official JVM.

    Apple is a hardware vendor and they'll support anything that helps them sell more hardware. Starting from that point of view, try to find a clear incentive for Apple to expend its resources to support Sun's Java, I challenge you (selling machines to Java developers is irrelevant).

    Apple's initial agreement to support Java was probably because they were hoping to get more software that works on their platform. At the time when they started, developers were abandoning the Mac platform and everybody was trumpeting Java as the technology of the future. So Apple was hoping that by supporting Java, their Mac platform would stay relevant by having more software to run. But now, the Mac is more relevant more than ever, developers are attracted to the platform more than ever, and Sun's Java, less promising than ever; so what's the point?

    Now that Java is open source, I'm guessing that Apple would support it like they support other technologies on the Mac, like PHP, Ruby and python. If it works they'll include it and if it doesn't then they won't. But I don't think that Apple would ever spend the resources they used to on Java.

  • No, that is a good question — why doesn't Sun support Java? I feel like I'm missing some piece of the history here, something that happened around 2004. Going back to the late 90s, Apple provided its own JVM (then called MRJ), but so did Microsoft (even on the Mac). Under OS X, Apple started with its own implementation, but as I said there was a lot of effort going into support. (And I imagine you're right, that the reason was Apple hoped it would land them more Mac apps — but, in fact, while Java apps can inherit the look and feel, they're not as fully Mac-like as Cocoa apps if that's your main priority.)

    Where I start to get lost is how we wound up with Sun supporting other platforms but not the Mac directly. Is it really that, by getting sued for doing their own Java/J# implementation and refusing to bundle Sun's JVM with XP, that Microsoft wound up with a *better-supported* implementation? Is it just as simple as Windows is the bigger platform, the more popular platform (despite Microsoft's best efforts with .NET/C#) for Java, and the Mac is easy to ignore because you can just leave it to Apple? (As I said, Sun doesn't have a totally sparkling record supporting some of their own initiatives.)

    Anyway, obviously I'm talking about issues (MIDI, video support for starters) that matter only to a small group of people, a tiny group once you talk about Java in academic and art use. That doesn't change the reality that for the academic and art communities there's a big advantage to using an open platform that's OS-agnostic. (Java obviously only recently beginning to meet the former, but long meeting the latter.)

    So I guess the more pertinent issue is, are we likely to see a new JVM implementation for Mac now that it's open?

  • Re: the Steve Jobs quote, has he said that beyond the context of the iPhone? Of course, Jobs also believes that allowing people to run applications on their cell phones could bring down the entire west coast Cingular network or allow the Cylons to access our defense mainframe.

  • One last thought, as well … we're making some big assumptions here:

    1. Apple doesn't care about Java.
    2. Apple is aware that implementation details like MIDI and video support — or big implementation decisions like delivery of Java 6 SDKs and runtimes well ahead of the general adoption curve — are a problem.
    3. "Apple" is a monolithic entity.

    I can't imagine that any three of these statements would hold across the company.

    1: Despite my gripes, Apple clearly continues to dedicate resources to Java on the Mac. (We can leave iPhone out of this for a moment.)

    2: I don't think Apple is aware that cutting support for multimedia features is a problem for anyone. Generally speaking, Apple and Microsoft higher-ups seem to have an only vague sense of what something like MIDI *is*, let alone that you have, say, students writing code in Java that takes advantage of MIDI implementation in their Java runtime. In fact, let's go out on a limb: betcha most Apple execs have never heard of QuickTime for Java and don't really know what MIDI is. ("Oh, yeah, that's something to do with music.")

    3. Apple is an enormous company, and it behaves like one. Java is pretty small on that radar screen.

    So, I suppose we've now definitively answered, in a whole number of ways, the "why" to my question. Now, as for that "how do you fix it" bit?

    Guess I should book a ticket to WWDC, huh?

  • Alessandro Sabatelli

    The first thing that needs to be done is that a bug needs to be filed at

  • A lot of this sounds rather ill-informed.

    First off, how is it that Quicktime for Java is "vaporware"? QTJ has been here for a while and it has been working for years. I am really at a loss trying to understand how you are throwing this label around, especially considering that the alternative, JMF, has been basically abandoned for years (as you rightly state), which truly makes it the more vaporous. Granted, there haven't been any new features added to QTJ as of late, but then again Sun hasn't added any significant multimedia features to Java either (and neither has MS). In my opinion, it should have been Sun's responsibility to make Java more multimedia-friendly, but they decided that it wasn't worth their while and it is only thanks to Apple that Java has any half-decent video wrangling abilities in at least two platforms.

    Second, that Apple is abandoning platform-specific code should really be of no concern to Java developers, since the whole point of the language is to be cross-platform. Who cares if Apple is dropping libraries that only work on OS X? If you want to access platform-specific capabilities then you are using the wrong language. I am no MIDI expert in Java, but the proper way to go about this is through the Java Sound API. Again, the whole point of Java is to be cross-platform, so if you really want access to CoreMIDI, CoreVIDEO or CoreWHATEVER you should be coding Obj-C. Just the same, if you want to access DirectX you should be coding in either C# or C++.

    Third, Apple's renderer for Java graphics is superior to whatever was in Windows until recently. In fact, Java graphics calls have been hardware accelerated for quite some time now, because Apple maps Java calls to its Quartz rendering engine, which is backed by OpenGL. In addition, there are a few examples in which rendering looks better in OS X because Quartz gives you antialiasing (for free) in certain operations that Sun's rendering engine can't or won't do in a similar way.

    And as far as Apple not having Java 6 yet, historically there has always been a delay between the Windows version and the OS X one. Apple will most likely ship 6 with Leopard, just like they shipped 5 with Tiger. Yes, it sucks, but frankly I am not really in need of any new features that are in 6, since none of them are really media-related.

    The bottom line is that multimedia in Java has lacked support from Sun, in every platform. Hopefully with Java's turn to Open Source there will be a change in this respect.

  • Good points all, Cristobal, and well-taken.

    I can clarify points here:

    1. QuickTime for Java vs. JMF and Apple vs. Sun:

    QuickTime for Java support seems to have stalled with QuickTime 6.4. In fact, both JMF and QTJ seemed to lose active support some time in 2003. This seems to be when both companies shifted attention away from things like desktop development and multimedia, and that's sad. (though yes, the blame is probably Sun's.)

    I'm equally frustrated with Sun, so this is not just to single out Apple. But as to whether it's a problem that QTJ hasn't gotten new features, it has clashed with QT7 updates, and I'm not clear if Apple is aware or cares about those issues.

    That's not to leave Sun off the hook, of course, and I agree that a more robust cross-platform API would be even better.

    2. Abandoning platform-specific code:

    For MIDI support in Java, you *do* go through the Java sound API. That's what's broken. Unfortunately, while I agree on avoiding platform-specific code in principle, in practice you need core MIDI library support to access devices connected to the system. (You need platform-specific access to cameras, too, etc.)

    At least here, as I said, there's third-party support. But when platform-specific support is an issue, it does seem that that should come from Apple.

    I disagree, though, that access to core libraries means you need to write in Objective-C. There are many ways of accessing or wrapping these libraries. What we're talking about here is, literally, the ability to access any MIDI devices at all. Access to platform-specific libraries doesn't always have to require getting very intimate with them.

    3. Superior Quartz-based Java graphics from Apple:

    I agree, absolutely. And this demonstrates what Apple *could* do with their Java implementation.

    4. Delay of Java 6:

    Right, this is less of a media-related issues, though things like scripting might be handy. I know there are many developers who aren't terribly happy about, though.

    Bottom line, though, I agree — the major issue is what happens with multimedia support in Java in general, a lot of that comes from Sun, and if Sun or the open source community (or in a perfect world, both) would start to address these things, Apple might follow suit. There are real-world issues, though, in which Java development for multimedia is smoother on Windows than the Mac, and that's still something I'd like to see Apple's Java folks start to address, even if a limited way (especially since being one step ahead of Sun isn't so hard).

    I do hope open sourcing Java will make a difference. I don't know yet what specific projects might be out there. Maybe the liberation of Java in this way will spur some of the Sun folks who care about multimedia to track these, as well.

    If anyone knows of any open source Java projects related to multimedia — or any progress at Sun — do let us know.

  • Pingback: SteamSHIFT » Mac, Midi, Serial, Java Etc.: Explorations in Digital Art and Technology()

  • Pingback: SteamSHIFT » Mac, Midi, Serial, Java Etc.: Explorations in Digital Art and Technology()

  • Aldanor

    <blockquote cite="there’s also the Lua programming language, which is gaining popularity and will soon be officially support in Max/MSP/Jitter">

    who said that?

  • Aldanor

    hm, comment was bugged, i tried to cite the line where you say that lua gonna be supported in max soon

  • has a similiar post if anyone's interested

  • bgrggfe

    You can find many Burberry Outlet Store Online now with the google website search ,so that you can buy some Cheap Burberry Bags directly from the website,you needn’t go aboard now if burberry store are not exist in your local city.And 
    the Burberry Bags On Sale with a incredible price ,you should be happy with them.