After well over a year of delays, Oracle has finally shipped consumer-friendly versions of Java 7 SE for Apple’s OS X.
But, you need this primer to understand it all.
Flashback… literally.
We first have to look at how this all came about, to understand the (very, very) important differences in Oracle Java 7 SE, how it differs from Apple’s Java 6, and from Oracle Java 7 SE on other platforms.
Back before Lion shipped, Apple announced Java support would be dropped from the OS X mainline distribution. After concern from users, Apple announced that they were working with Oracle to support and embrace Java 7 SE as part of the OpenJDK project.
And all was good. Apple’s Java code would simply become OpenJDK code, you’d download it just like Flash as a separate download, and keep rocking with Java.
This was important, because Java was really what helped make Mac OS X (and Apple) a success. Java apps in the early day were an important part of the OS X app tally. Developers could use a Cocoa bridge, and easily convert a Java app into a totally functional OS X app. Over time, Java apps became capable of Cocoa-like functionality on their own, and the Cocoa bridge was deprecated back in Tiger.
Unfortunately, Oracle had a really rough time getting OpenJDK and Java 7 running well on the Mac. Apple didn’t hand over the Java team, just offered assistance in the migration. Lion shipped with Java 6 as a download that would install automatically, when needed, similar to printer drivers in OS X Lion.
That was fine, Java 7 was really new, and most were content with Apple’s somewhat-maintained Java 6. All hell broke loose, however, when the Flashback worm shipped.
Flashback leveraged Java to bypass Apple’s malware detection and security functions. It was a Java malware masquerading as an Adobe Flash security update. Apple responded by locking out Java totally, if the user hadn’t touched it for 90 days. In Safari, you would get a notice and be able to easily turn Java back on. In other browsers… not so much.
Java 7 SE for Mac, and how it’s way different
First, you need a primer on how Java is distributed. There are two downloads for Java. The Java Runtime Environment (JRE), and the Java Developer Kit (JDK). As the names imply, one is for running Java apps, the other is for developing them.
In Java 7 for Windows, Java 7 Linux, and Java 6 for Mac, all three function similarly. A user installs the JRE, and it’s deposited in a central location (appropriate for each system). A web browser plugin then calls up the Java from that location, as well as any app that needs to run Java inside the operating system.
However, Oracle is taking a different, special approach for Java 7 on OS X. With Oracle Java 7, the JRE is limited to the web-browser plugin. To run desktop Java apps in OS X, using Java 7, you must use the JDK.
Why is Oracle doing this? Several reasons.
First, Oracle knows that OS X is the only consumer-friendly OS where many desktop apps are Java based. If you try to run apps like CrashPlan on Java 7, they just don’t work yet.
There’s nothing technically wrong with them, developers just need to tweak a few things to make it work without editing settings, configurations, etc.
Oracle missed the OS X Lion date, and the OS X Mountain Lion ship date. As such, there was no easy siren call to developers to “make the transition” from Apple Java 6 to Oracle Java 7. And, Mountain Lion still offers a security-supported version of Apple Java 6. It’s good enough for most people, today.
In the web browser, however, it’s necessary to ship a new Java 7 plugin, because of the Flashback killswitch that Apple implemented, which disables Apple Java 6 in the browser, if it hasn’t been used for 30 days or longer. That ain’t going away, Apple doesn’t want folks using Java anymore in the web browser (especially since iOS devices aren’t permitted by Apple to even run Oracle Java, but that’s just going to tick off people in Cupertino if they read it… perhaps I should bold it instead of italic it instead ;-).
Over Time, This Will Improve
The Oracle 7 JRE for OS X includes an auto-updater, similar to how it runs on Windows. I suspect, over time, desktop app support will be added in an update to the JRE. I suspect the need to download the JDK to run desktop apps in Java 7 on OS X will go away with time.
That said, it’s confusing to say the least.
My hope is that in the next release of OS X, Apple disables Java 6 completely, and points people to Oracle’s web site to download the latest JRE. In doing so, the masses will adopt Oracle Java once the next OS X release ships, which based on current releases will happen over the next 18 months.
All I can say, is Apple, think forward, not backward. Don’t lock out Java, continue to provide it the hooks to thrive. It remains unclear what Oracle will do with Java long term, especially in mobile… but being a foe of Java means being a foe of open computing. I don’t use an iPhone because it exists in a walled garden crystal prison. If the Mac takes a similar tact, my decades as an Apple customer will be over.
This article was written a year ago. Since then, JDK 7 releases from Oracle for OS X have added the JRE web plug-in to their download. So, if you want the JRE and JDK, you now only need to download the JDK… you’ll get the latest versions of both.