The future of Java on Macs

7

Leopard released last week and I blogged my feelings then about the lack of Java 6. The Java community has seen a lot of moaning and gnashing of teeth over the weekend and the anti-Java community has had a field day pointing and laughing at our distress.

I want to use Java 6 (and future releases) because I’m a Java developer and I like Mac+OS X as a development platform. But, Apple doesn’t really give a shit what I want. They are a company, they have a finite amount of engineering resources, and they must choose (like every company) how to best invest those resources to make more money for shareholders like me.

Apple’s target market is not developers like me or probably you. Apple is a consumer electronics company and their market is really fine people like my wife, my parents, etc who have no idea and no interest what language their applications are written in. The reason people like Apple (the reason I like Apple) is because stuff looks pretty and it works1.

If we look at Java (or perhaps even more importantly the JVM), it has been undeniably successful as a server environment and I see no reason to believe that that’s not going to continue for a long, long time. It works, it’s solid, it’s fast, it’s manageable, multiple vendors agree on a strong spec and support it, libraries exist for virtually anything you can imagine, etc. But hey, the average consumer is NEVER going to run a “server” app. These worlds have virtually no intersection.

Average consumers run desktop apps and web apps. If you look around at the desktop apps you use as a non-developer on a daily basis, you will notice that approximately 0.0% are built in Java. I have several I use every day, but they are all developer-related. If you look at web apps, I suspect there aren’t too many Java apps you use every day, but I think the chances are much higher that you are using Java on the web than on the desktop right now.

Sun is currently pushing hard to make Java relevant in both these worlds. Their upcoming work with Java Kernel and the Consumer Edition of the JRE are spot on. They are very actively addressing the biggest issues with Java on the web and I think that kicks ass. It breaks down a lot of objections developers have against writing a web app in Java and I think that can only help increase the number of Java web apps.

It’s clear that Sun also wants to make a push in the desktop world. I see those efforts as a little less focused, but still promising. The Java FX stuff is one idea towards making development easier and the Java 7 JSRs for the Swing App Framework (296), Beans Binding (295), and bean validation (303), as well as possible property/event support in the language are all looking at different micro-aspects of Swing development. Swing is a little heavy-weight and annoying but for all that I think it’s a very good cross-platform GUI framework and it’s certainly possible to write very nice consumer-friendly apps in Swing.

But getting back to Apple, they have clearly made a bet in the web world and it ain’t Java. Seems like the bet is on Javascript, with Flash as #2. On the desktop, Apple seems to be investing heavily in making their existing frameworks (Cocoa and Carbon) cross-platform allowing them to build apps in Objective-C using these frameworks that run on both Windows and Mac. Note that “cross-platform” here means Windows and Mac, period. Remember, consumer is the key word. Apple doesn’t give a fart about anything that can’t be sold to millions of people.

To recap: 1) consumers don’t need server apps on Java, 2) betting on Javascript/Flash on the web, and 3) investing in Mac-native frameworks to do desktop. Putting myself in the seat of whoever controls the allocation of engineering resources at Apple, it’s clear to me that Java is not the top priority. Apple is still spending money on Java2 but if I walked into a job like this and had to make a decision whether to put 5 guys into fixing Javascript bugs in Safari or porting Java 6, I’m not even going to wait till my latte cools before they’re hacking Safari. Given the iPhone launch and subsequent Leopard push-back, they clearly are tight with resources and any manager worth his salary is going to focus on the priorities.

So, given my entirely self-motivated interest, I think it’s worth thinking about what could be done to make Java a first-class citizen in the Apple world again. Clearly, developers wanting to deploy web and desktop apps in Java on Mac would make a difference. If a sizable chunk of consumers were regularly using Java apps on Macs, it would get some love because people like Macs because stuff works. If apps they want to use don’t work, Apple will work to fix that.

I think we have to look to Sun to push the issue. That may mean contributing resources or sponsoring or advocating for an open-source Java port to Mac. But going back to the “looks pretty and works” aspect, seems like the major value Apple adds is making Swing/AWT/SWT play nice with Aqua and I suspect that’s not something it’s easy to help with unless you’re inside Apple. (Am I wrong?) Another aspect is that no one has more to lose in this than Sun aka JAVA. Clearly THEY are betting on Java.

So what can we (the developers) do? Certainly making our voices known won’t hurt. We are a small but vocal minority. We can write apps in Java for the web or desktop. We can work on tools that allow us to install and use Java apps as easily as we can “native” apps. Seems like a lot of the Java apps out there run fine but are a mess to install and seem awkwardly non-native around the edges. We need something (or maybe just more people need to know about what already exists) that helps make a Java app into something nicely installable on the Mac.

Java will continue to limp along on Apple for the forseeable future. But it’s not going to thrive until there is a change of heart at Apple, and I don’t really believe that will happen until it matters to the average consumer. Unfortunately, that may mean that I can’t use a Mac at work anymore, which would be a shame.

Notes
1 Admittedly, not everything works perfectly. I’ve got my complaints about Macs and OS X. But compared to most home PCs I’ve worked on, they are light-years apart. I’ve spent years doing tech support for my family and friends that use PCs and working on these home PC boxes (the Win 95s, 98s, etc of the world) makes me want to take my own life. I’ve had fewer problems with work PCs, but then they are typically a) new, b) loaded with RAM and CPU, and c) full of automatic updates, anti-virus apps, firewalls, and the best protection IT can buy and d) come with a tech support team.

2 Apple just released their Java on Leopard Release Notes which clearly show that they are fixing important bugs and adding 64-bit support, which is a big deal. BTW, the link requires Apple Developer Connection registration.

Comments

7 Responses to “The future of Java on Macs”
  1. Robert says:

    Java on Mac OS X v10.5 is comprised of J2SE 5.0 (1.5.0_13-b05) and J2SE 1.4 (1.4.2_16-b05). J2SE 1.3 is not present on Mac OS X v10.5. J2SE 5.0 is recommended for all development and deployment on Mac OS X, and all use of J2SE 1.4 is deprecated.

    J2SE 5.0 on Mac OS X v10.5 contains many new features including 64-bit Intel support, a refreshed Swing Aqua Look and Feel, improved SWT interoperability, and a Sun 2D graphics pipeline.
    ——————————————————-

    The docs talk about Java5 and not Java6.

  2. Alex says:

    @Robert: My point was that Apple is working on Java, for example by fixing lots of important bugs (in Java 5) and adding 64-bit support (in Java 5). I fully expect that Java 6 will be available on Leopard at some point in the near future. Might be a few months even, but I’m sure it’s coming.

    My guess is that they probably have to absorb all the Java 5 64-bit changes into the Java 6 branch and clean it up before shipping it. Leopard as a whole shipped late, I have to imagine Java 6 on Leopard is later still. I’m further guessing that the Java 6 preview was pulled because it will not be supported on anything pre-Leopard, so it was a product mgmt decision to pull the pre-Leopard preview.

  3. Blair Zajac says:

    I too was disappointed not seeing Java 6 available.

    But to your point about engineering resources, Apple took the time to put the Ruby on Rails stack in 10.5, which while web related, will be less likely used then Java applications running on the Desktop.

    So maybe they added RoR for the coolness factor, since no-non developer will ever use that.

    RoR was probably a much easier port then Java 6 would, since everybody’s already running RoR on 10.4 and its well known how to do so.

  4. Alex says:

    RoR is hot, Java’s not. Raises the priority. Plus, I think you’re right that porting a JVM is way more work than just including some RoR gems which already existed and worked – just a packaging and testing issue I would think.

  5. Robert says:

    Ah sorry then, I misunderstood you. I also think Apple is going to come out with Java6 just like they have delivered before. Even if they didn’t, I would fire up Parallels and use it on another OS in a VM. Give up my mac though? Not bloody likely. : )

    The RoR and Python stuff was handled mostly OUTSIDE of Apple but with an Apple Techie along. The reason Perl wasn’t included was the developer for CamelBones didn’t make the timeline.

  6. Peter Kirn says:

    It’s interesting that, for all the criticism of Java, no one questions the idea that the Cocoa and Carbon frameworks have ANY future outside the Mac. The honest truth is, a lot of Mac development is cautious about just how much Cocoa gets used. And those doing cross-platform development start out with cross-platform libraries from the start. I think Java cross-platform development for the desktop is FAR more likely than Cocoa.

    Meanwhile, I keep hearing buzz that in fact Java 6 is completely derailed:
    http://createdigitalmusic.com/2007/10/31/rumor-mac-javas-demise-is-real-and-why-that-could-be-good-news-for-multimedia/

    That’s fine with me. There are lots of good reasons for a push for desktop Java, and plenty Java can do that a) Flash/Flex/AIR can’t or b) Java can do more easily than C++ development can, depending on the job.

    It seems like the desktop is going to have *more* rich clients in the future, not less. But the company to make that play happen is obviously Sun (and the OpenJDK community), not Apple. So, for the time being, the Mac remains just fine for Java 5 deployment, and we can hope that Sun finds a way to finally get development of JDK back in their court and out of Apple’s.

Trackbacks

Check out what others are saying about this post...
  1. [...] Alex Miller – The future of Java on Macs (tags: java apple mac osx future development programming) [...]



Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!