Good news, Apple deprecated Java
Apple released an update to their Java environment on Wednesday, and among the changes the big one is that they have declared Java "deprecated". This has generated lots of buzz from the Java community, many of them saying that Apple is trying to kill Java on the Mac platform, or that OS X 10.7 "Lion" will not come with Java pre-installed, a change after almost 10 years of Apple providing Java runtime environments on every Apple computer sold. But besides the sparse description of the change in their release notes, Apple has said nothing to confirm or deny these allegations. As a Java developer working exclusively on a Mac for almost 3 years now, the news first came as a bit of a shock, but after careful consideration I think this is actually good news, or at least not the really bad news that people are talking about. Here’s why.
In the beginning of the OS X era, Apple really cared about having a Java runtime on their operating system. At a time where more than 90% of the desktop computers were Windows machines and most of the desktop application development was done for this OS, having a solid JVM meant that Apple products could run Java-based desktop apps from day one, and it meant that companies would be able to have applications run on either platform as long as they did Java apps. So they licensed the JVM from Sun so that they could write, modify and make sure they had their own virtual machine from day one.
But now, with Apple focusing its effort on consumer devices like the iPhone/iPad, they don’t really care about this anymore. Just last Tuesday, Jobs said that Mac revenue only accounts for 33% of their overall profit, and I think this number will decrease further as they keep bringing new devices to market. With less effort going into OS X, they will start trimming on the edges in order to be more competitive with less resources, and Java on the Apple is the first to go, but it probably won’t be the last. This really is not surprising at all since Java on the Mac has been falling behind the official releases for quite some time. Java 6 was released almost 2 years behind, for starters, and that should have been a big clue of what happened on Wednesday.
But why is this good news, you ask? First, because as of Wednesday, we finally have an updated JDK that’s on par with the official release, including all bug and security fixes, and this will continue to be the case at least until the end of life of Snow Leopard, according to Apple. Second, they haven’t actually said that they will remove Java from Lion, they only said they will not release Apple-controlled versions. This means that we will have to rely on Oracle to produce an OS X version along with all the different versions which they’re already producing (Windows, Linux, Solaris, etc). With Oracle and IBM already collaborating on improving Java, I don’t think this is a big issue, but it’s definitely up to Oracle to do this (or maybe not, since the development of Java is based on OpenJDK, an open source effort that means anyone could come and port everything to OS X). What I would really like is for Apple to contribute back their development efforts into OpenJDK.
There’s really no reason to panic. Writing Java code on the mac should not be affected by Apple’s announcement. If any, having the same JVM release version as other platforms will actually improve it. Writing for the mac also shouldn’t be affected, unless you want your apps to be released through their upcoming App Store, since their leaked guidelines mention that it will not support having apps that are written using "deprecated or optionally-installed technologies", but you can still release the apps yourself.
The only gray area right now, as I see it, is the Apple Java Extensions API. This is the API that allows Java applications work closely with OS X, and includes things like event handling, Menu generation and underlying functionality and that make applications like IntelliJ IDEA look more like a native Mac application. As before, I sincerely hope that Apple contributes this back to OpenJDK. Worst case scenario, the Java community would have to reproduce these libraries from scratch. But besides that, Java on the Mac is just business as usual, and that’s good news.