Here We Go Again, aka Java 6 On OS X

A new release of Java, a new wave of people saying they won't buy Macs unless Apple get their Java update now, dammit now! John O'Conner joins the chorus. Of course, there's no mention of why he needs Java 6 instead of Java 5, just that he has to be up to date with the very latest. Last time round at least people were eager to use generics and other new language features, but there's really not that much that changed in Java 6 outside of a few specific cases.

Seriously folks, the vast, vast majority of Java developers aren't using Java 6 and won't be for quite some time. I know it's fun to play around on the bleeding edge but can we just stop and look at what's actually best for our projects?

On the plus side, by the time we do this with Java 7 the answer will be simple – it's opensource, port it yourself. Then maybe people will appreciate how difficult porting a JVM to a new processor architecture and OS and understand how long it takes.

21 Responses to “Here We Go Again, aka Java 6 On OS X”

  1. Neil Weber Says:

    For a Swing developer there are many nice new features in Java 6. In particular, there is better desktop integration. Sure we can code against Java 5 and use JDIC and native code, but why when we could just use Java 6. As a Swing developer, I wouldn’t use Mac OS X unless I was forced to simply because Apple’s Java support is so poor.


  2. John O'Conner Says:

    Adrian, I can appreciate your question…here’s your answer. In the specific case that prompted my blog, I needed SwingWorker as a core Java library. Interestingly, the use of SwingWorker’s process method did not work as documented. I had to switch back to Windows or Linux to get the code to compile an run properly. See, I’m not so evil after all. I had a real problem, not fabricated, and I couldn’t use Mac OS X and Java SE 6 to solve it.


  3. Adrian Sutton Says:

    Neil,
    The desktop integration stuff is nice I’ll admit, but I’m not entirely sure it outweighs the pain of upgrading all your users to the very latest JVM. It would actually be a good thing to target Java 5 with JDIC and native code since you get the same functionality and a wider range of users. It would be pretty straight forward to abstract it away so that JDIC was only required on Java 5, making Java 6 deployment JNI free. Granted, a lot of developers can’t be bothered with supporting multiple JREs which I simply don’t understand – I have far too much experience with clients demanding support for older JREs to understand why anyone would cut off so much of their market.

    John: why did you need SwingWorker as a core Java library? It’s pretty simple, short code that you could have just used rather than needing Java 6 just for that. I’m not saying life isn’t easier on Java 6, but is the lack of SwingWorker really that big a deal that you’d completely dump support for JRE 5 and below as well as OS X?


  4. John O'Conner Says:

    I’ve told you that I needed a core library api because you asked for a reason. Now you want to know why I need that API. Are you serious? I think you’ve missed my point completely. I want to use the Mac as my primary development platform to develop apps using Java SE 6, and I’m just pointing out that isn’t possible because the complete, up-to-date platform isn’t available. Surely there’s no debate about that.


  5. Adrian Sutton Says:

    John,
    I’m not sure why you’re so defensive – there are quite a few reasons you may need or want to develop with Java 6, including not wanting to have to work around any limitations. It just seems very odd to me that having to grab a copy of SwingWorker and add it to your project sources is enough for you to want to change your entire development set up. If you are just like to keep up to date then that’s fine but that’s unlikely to be enough reason to convince Apple to devote more resources to their Java port.

    Overall, I’m not just referring to your comments but to a number of vocal Java developers on OS X that keep demanding Apple stay completely up to date with Sun’s releases. Apple is one of the faster Java licensees for porting new releases and for the vast majority of people it’s fast enough. If you need to be completely up to date with the very latest releases for whatever reason, you need to be using a platform that Sun releases for – there’s no point in complaining to Apple, it takes time to port Java. Ditch the Mac, get a Windows, Linux or Solaris box and move on with your development.


  6. Carmine Loud Anonymouse Says:

    * Java 6 is the current platform, for 3 months now, not some bleeding edge beta.

    * Yes, porting takes time, and Apple has had at least two years to do that. They didn’t just have Java 6 dropped on their laps in December. Apple had the work done up to b88 of 8/15/2006, releasing their port of b88 on 9/13. And they’re not writing this from scratch. The bulk of the platform is portable Java code that Apple doesn’t touch.

    So your argument is lame. Apple *choose* not to dedicate the resources to complete the job on time, or perhaps they *choose* to hold it as a bullet point for Leopard as they appeared to have done with Tiger. Java programmers shouldn’t just suck up and live with that, as you recommend.

    I switched to a Mac, bought 4 Macs myself, convinced other programmers to switch to the tune of around 15 more machines and counting, precisely because we can write Java software on it. I also hope to buy additional Xserves to deploy production Java 6 applications on. (And Apple: I and most programmers don’t need Maverick as a carrot to buy Leopard. We’ll be waiting in line anyway.) I don’t want to have to switch to Linux, like some have been doing, but if Apple continues to fall behind, I’ll have no choice because this is my living. But on the balance I’d rather spend my money with Apple than Dell, and be an Apple advocate than a Linux advocate, if Apple will do their part.


  7. Adrian Sutton Says:

    Carmine,
    Please, just go buy the Linux box and be happy. Develop for people who have Java 6 even though it hasn’t even been released to autoupdate by Sun yet. Also, you might want to realize that while your post was made today, my original post was back in January – 3 months ago. Also, Apple did not and has never “had the work done” up to b88 as you would realize if you actually read the release notes for that *early access seed*. Fortunately, soon all of Java will be opensource so you can show how easy it is to port a Java release, pass the JDK and integrate it all into OS X by doing it yourself. Good luck with that.


  8. Steve Michael Says:

    Wow, I just bought a Mac Pro today and I, like a many number of Java developers had issues with the Mac only supporting JDK 1.5. My issue is that I want to learn and work with Java 6 BEFORE it becomes mainstream to the public. I, as a developer want to start writing code that will be finished when everyone else gets Java 6 as a “standard”. This coupled with the fact that Netbeans 5.5 and the VWP runs a ton better on 1.6 than 1.5 is significant to me.

    Now why would Apple not release a newer JVM? I don’t buy all the conspiracy theories out there, but I will concede that Steve Jobs has made some recent derogatory comments about Java, however Apple appears to want to support Java.
    My theory is that the new phone is pulling all available developers off of other projects on to it. If the new phone fails then that would be very bad for Apple and they know it, yet if they delay a JVM and their new OS, that won’t have that big of an impact on them. Heck they can delay the OS for a year and it will have little to no impact on their sales, but if that phone crashed a lot or has other serious issues then that will really sting.

    Having said that, I am greatly disappointed to see that it still looks like Apple is stuck on a beta build and no new development has take place that I can see for a very long time. This reminds me of when Novell said they would be “leaders in the Java community” and then failed to deliver new JVM’s.

    I guess this means that I will probably be doing my development in Windows XP via a VM emulator or possibly using Ubuntu 7.04 in the VM.

    Lastly, you took a cheap shot at the previous poster saying now that Java is GPL’d that he should just port it to the Mac. I will say that now that I hope and pray that Apple doesn’t delay so long that developers find it necessary to do exactly that. If that is the case then doing any Java development on the Mac is all but dead. Again, I don’t think that is or will be the case, but I have seen it happen with NetWare, so the possibility is out there.


  9. Anonymous Says:

    Steve,
    If all you want to do is learn about the Java 6 technologies before they become mainstream, why do you need the final release? Why isn’t the beta good enough for what you want to do. There are very specific areas where there have been changes between what Apple has available as a developer preview and what’s in the final release but unless you’re actually wanting to use those areas and the changes affect your ability to learn about the area I can’t see why you would be concerned.

    Also, regarding my comments about porting the JDK to OS X – it’s not a cheap shot, it’s a way of pointing out that you can’t just recompile the JDK and have it run on OS X. In other words, it demonstrates that Apple is taking time to get an updated version of Java out not because they don’t have resources working on it (they do, and you can talk to them on the java-dev list Apple provides) but because it’s a lot of work. If it were a simple task, you could, as of today, do it yourself. I’m willing to bet that if a port comes out of the OpenJDK code, it will be for Intel only (the Sun JDK code doesn’t support PPC) and it won’t be coming out any time soon. It also won’t have a native L&F available (Apple develops that too) and will be missing most or all of the other hooks into the OS that Apple provides.


  10. Steve Michael Says:

    Excellent points, but lets say that I am using Netbeans 5.5 and doing production work (my code will be 5.0) but Netbeans wants Java 6. I then run into a weird issue and my mind starts to wonder if this because I am using a beta of 6 and not a finished product. Now if you say that this build is near production ready, then this may not be an issue. I will try it and let you know how it works. I just ordered my Macintosh today so I have no clue how good or bad Java 6 is now.

    From my brief reading today it appears that Apple ties the JVM to specific OS calls and that they try and sync the new JVM release with a new release of the OS. So when the 10.5 is released, we may then see Java 6 released. What do you think? If this is the case then when the OS gets delayed it obviously delays the JDK/JVM.

    It sounds like you have some insight on recent developments with Java 6 on the Mac. Is it currently being worked on? What changes have been made recently? From my limited reading it doesn’t look like the project has been touched in a while and that is kind of scary. However if Apple has developers currently working on it then I would assume the critical bugs would be fixed soon. This assumes that they are not targeting 10.5 for the OS though…

    Either way I am cheesed about getting my new Mac Pro and can’t wait to try out development on it. If for some reason it sucks I can just run my tools within Windows on it. Either way I am cool with it.


  11. Anonymous Says:

    I have no more insight into the Apple team than anyone else could, I just spend the time to actually read the messages on Apple’s java-dev list. If you plan to develop Java on OS X, you should go find that list and subscribe. You’ll skim a lot but it will give you a much better impression of what’s happening with Java. Please do everyone a favor and don’t ask about future releases of java on that list, Apple doesn’t comment on future products and the archives are littered with conversations going over and over that stuff.

    The Java 6 preview is fairly old, but should be perfectly fine for learning Java 6 technologies. I don’t know NetBeans so I have no idea what it’s like to use, though I think I saw someone complaining it didn’t work correctly. Also, it’s worth noting the Java 6 DP is under an NDA, so you can’t talk about it with anyone – including on the Java Dev list.

    Even though Apple is working on Java 6, that doesn’t mean they have any plans to release another developer preview. There is also no way of knowing for sure what OS will be required for Java 6 when it does ship or when it will ship. The best you can do is look at what has happened in the past – Java 5 required the next release of OS X and it shipped the same day (but as a software update). From that I’d guess that Java 6 will require Leopard. I’d also tend to be conservative and make my plans based on Java 6 *not* being released until well after Leopard (though it’s more likely to ship close to or with the release). It’s best to be conservative when guessing so that you’re less likely to be disappointed or negatively affected by being wrong.


  12. Steve Michael Says:

    Thanks for the update. This appears to be a bit of a problem if both of our guesses are correct. We probably won’t see 10.5 and thus Java 6 (supported) until November of this year. If it follows the trend you mentioned above it could be next year before we see Java 6 made widely available. So if you and I are developers of Java and want to do some cool Java 6 applications then targeting the Macintosh platform isn’t really possible for the next few years because not everyone is going to upgrade to 10.5 right away.

    Again this is all speculation, but if Apple ties the JVM so close to the operating system then unlike Windows, Solaris, and Linux it will be impossible for a Java developer to know what JVM is on a Macintosh because he or she won’t know what OS they are on. The developers would have to assume it is a very old one and thus the cool new Java applications will be cut off from Mac users unwilling or unable to upgrade to 10.5 As I mentioned above if someone is running Ubuntu, Redhat, Solaris, Windows 2k, Windows XP or Solaris 9 or 10, they can go get the latest JVM (in this case 6) for their platform and be off and running. It appears to me that Apple should look at taking a similar approach to the JVM and not tie it so close to the OS. Perhaps there is some underlying reason they need to do this, but seeing that Linux, Solaris and Windows don’t do this I can’t come up with a great reason why. The only thing I can think of is that they are still getting their hands around the Intel chip and the OS. Either way I hope that they decouple the JVM from the OS upgrades and thus make it possible to get Java 6 on 10.3, 10.4 and 10.whatever. I do understand that there does come a point where you can’t support the latest code on an old OS but I think that the other three OS’es do a nice job and I would think it would do Apple a world of good to mimic those JVM implementations. I believe you can even get Java 6 for Windows 2000 and that is a very old OS. I also believe you can get Java 6 for RedHat 7.3 and that also is a very old OS. It doesn’t make much sense to me why Apple needs to be different, and perhaps there is some great reason for it. I would love to hear it, and my only fear is that Apple doesn’t view Java as “some old ball and chain” that they really don’t want in their OS. I don’t believe this is the case, but time will tell. “If” Apple does decide to get out of the JVM business, then I hope they give the code they have out to the community and perhaps Sun would take it on, much like they did Linux. As you mentioned it wouldn’t be trivial, but I also would imagine that Sun would do a good job with it. It would also be GPL’d and “we” could talk about it without all the NDA stuff.

    Lastly (going to bed).
    I see this as little different than Quicktime or Flash. Those don’t appear to be tied to the OS, granted maybe they are… I do know they don’t tie ITunes to the OS, so why Java? It doesn’t make much sense to me, and I am obviously an Apple fan since I just bought one, but I am not a fanboy, so I don’t drink the Apple koolaid…

    Thanks again
    Steve Michael.


  13. Anonymous Says:

    Well if you make your application depend on Java 6 you aren’t just loosing OS X users, you’re loosing the vast majority of users because most people have older versions of Java. The reality is you have to make your business decisions according to reality – Apple doesn’t care if them not having Java 6 causes you problems, Apple only cares if it directly or indirectly causes them problems. It’s clearly seen as a problem by Apple, which is why they’re working on it at all, but not a big one and resource allocation will be aligned with that.

    Regarding the linking of java and the OS, on OS X unlike any other OS, java is a core component, not an additional piece of software. Additionally, OS X is probably the youngest OS out there, so Apple are regularly adding not just nice-to-have APIs, but really darn useful APIs that Java (particularly the AWT/Swing/Java2D stuff) can take advantage of. There are a lot of reasons Apple chose to take this route and the java-dev archives have a great myriad of discussions about it. You really should go read through the archives if you are interested in this stuff, every question you’re asking and every comment you’re making has been made and debated multiple times in the past. There’s no koolaid involved here, just a need to understand that Apple works based on Apple’s interests, not yours and that there are various technical and business trade offs that can be and have been made.

    Finally, QuickTime is tied to the OS and is a core component just like Java. There are QuickTime updates outside of OS releases just as there are Java updates outside of OS releases but both are actually updating core parts of the OS but those parts are clearly identifiable as QuickTime or Java.


  14. Steve Michael Says:

    Thanks again for the comments.

    I believe that if someone developed a Java 6 web start application today it would work fine on all the major OS’s out there except the Macintosh. I believe it would prompt them to download the Java 6 JVM and then they would be off and running. I haven’t tested this but from what I have read it is true. Please let me know if that isn’t correct.

    I also appreciate Apple creating useful API’s but if the cost of the those API’s means long delays in the release of newer JVMs and ties it directly to the OS then I don’t think it is unreasonable to start a discussion on the merits of that VS doing what all the other OS’s do.

    Thanks again
    Steve Michael


  15. Anonymous Says:

    Adrian Sutton,

    Your profile says that you are working on “community building”. Your “tone” in responses here does not suggest that.


  16. Colin Says:

    Regarding “losing” customers on other platforms, that’s only true if you don’t control your release environment. I work in a space where I don’t control the OS, but I CAN require versions of Java and it is the norm for me to do so. Now I’ve installed Leopard and the Dev Tools and there’s no Java6, so Apple has removed my ability to develop modern Java apps on their OS.


  17. Anonymous Says:

    Adrian -

    It is getting close to a year since you originally published this blog entry. Leopard is out and still not Java 6. Do you still believe that Java 6 is as insignificant as you originally thought and that Mac’s tardiness is still completely acceptable. I’m working on a project that is build on Java 6 and I’m being forced to run VMWare on my Mac just so that I can do my work. I am personally disappointed in Apple for not staying up-to-date. Especially since Java 6 has been out for over a year now. Sure I have this pretty OS that looks good in the dark, but if it does not functionally meet my needs is it really worth it?


  18. Adrian Sutton Says:

    Anonymous,
    Current I’m frustrated by the fact that IBM doesn’t support Java 1.5 – so 1.6 doesn’t seem too pressing no. There is no dramatic improvement in Java 6 that makes me want to depend on it so I’m not concerned. Is Apple slow in porting Java 6 – yes, is anyone else faster, not that I’m aware of.

    If you for whatever reason need to have up to date JREs you should use an OS that the Sun reference implementation supports so that you will have access to new Java versions as soon as they are released. If you bought a Mac thinking that you’d have quick access to the latest JREs you didn’t do anywhere near enough research – Apple has always been slow to port JREs and probably always will be. Deal with it.


  19. David H Says:

    Adrian -

    I have a better reason for needing it: it’s called write once, run anywhere. We write Java code. We run it on Windows. We run it on Linux. We try to run on Macs, and the byte code is not compatible (it has the wrong version in it).

    So: do we reinstall JDK1.5 on everything else, or just ditch the idea of using OSX?

    The answer is simple… sorry, OSX users. And all because Apple can’t get their act together to update their JDK. *sigh*


  20. Andrew Herron Says:

    uh, David… you don’t need to install JDK1.5 on everything else. You just need to COMPILE with 1.5 and it will run fine under 1.6. The editor that AJ and I work on is still compiled with 1.4, because some of our big customers refuse to upgrade (and if you look closely, Sun are still releasing and supporting updates for 1.4). For that matter, we continued to support 1.3 until Microsoft finally dropped support for IE on Mac.

    We have zero problems running under 1.6, and thanks to the JIT compiler we even have some 1.6-specific code behind a JRE version check to take advantage of the improvements.


  21. Adrian Sutton Says:

    You don’t even need to compile on JDK 1.5 – you just need to target 1.5 so that it create valid bytecode (and of course, not rely on 1.6 only APIs). Simpler than most of the cross platform issues Java developers deal with every day.


Leave a Reply

(Valid OpenIDs will skip moderation)

Alternatively, subscribe to the Atom feed.